TRUNCATE(1) | 用戶命令 | TRUNCATE(1) |
名稱¶
truncate - 縮減或擴展文件尺寸至指定大小
概述¶
truncate 選項... 文件列表...
描述¶
將文件縮減或擴展至指定大小
如果指定文件不存在則創建。
如果指定文件超出指定大小則超出的數據將丟失。如果指定文件小於指定大小則將用零字節填充擴展部分(空洞)。
必選參數對長短選項同時適用。
- -c, --no-create
- 不要創建任何文件
- -o, --io-blocks
- 將給定大小的數字作爲 IO 塊數處理,而非作爲字節數處理
- -r, --reference=參考文件
- 以所指定的文件大小作爲基準
- -s, --size=尺寸值
- 使用給定尺寸值設定或調整文件大小
- --help
- 顯示此幫助信息並退出
- --version
- 顯示版本信息並退出
The SIZE argument is an integer and optional unit (example: 10K is 10*1024). Units are K,M,G,T,P,E,Z,Y (powers of 1024) or KB,MB,... (powers of 1000). Binary prefixes can be used, too: KiB=K, MiB=M, and so on.
給定尺寸值也可以使用下面給出的字符之一前綴進行修飾:'+' 指擴展數值,'-' 指縮減數值,'<' 值最大值,'>' 指最小值, '/' 修改大小爲指定數值的倍數,向下舍入,'%' 修改大小爲指定數值的倍數,向上舍入。
作者¶
由 Padraig Brady 編寫。
報告錯誤¶
GNU coreutils 的在線幫助:
<https://www.gnu.org/software/coreutils/>
請向 <https://translationproject.org/team/zh_CN.html>
報告翻譯錯誤。
版權¶
Copyright © 2020 Free Software Foundation, Inc. License
GPLv3+: GNU GPL version 3 or later
<https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO
WARRANTY, to the extent permitted by law.
參見¶
dd(1), truncate(2), ftruncate(2)
完整文檔請見:
<https://www.gnu.org/software/coreutils/truncate>
或者在本地使用: info
'(coreutils) truncate invocation'
跋¶
本頁面中文版由中文
man 手冊頁計劃提供。
中文 man
手冊頁計劃:https://github.com/man-pages-zh/manpages-zh
2020年三月 | GNU coreutils 8.32 |