Provided by: manpages-zh_1.6.3.6-1_all bug

名称

       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