Coreutils - rejected feature requests
Coreutils - rejected feature requests
Some of the hardest work on coreutils is knowing what to reject and providing appropriate justification to the contributors. The contributions below while all good ideas, were not included for various reasons detailed on the linked mailing list discussions.
Coreutils 中最困难的工作之一就是决定拒绝哪些功能请求,并为贡献者提供合理的解释。以下列出的贡献虽然都是好主意,但由于各种原因(详见链接的邮件列表讨论)未被采纳。
cat
- cat —timestamp: awk or perl is good enough for this.
- cat —timestamp: 使用 awk 或 perl 即可实现。
- cat -n alternate formats: Manipulation with existing tools supports this better.
- cat -n 替代格式: 现有的工具处理此类操作效果更好。
- cat —show-ends to highlight trailing whitespace: grep —color was deemed better/sufficient.
- cat —show-ends(高亮行尾空格): grep —color 被认为更好或已足够。
- cat —header to output filenames for each file: tail -n+1 does this already.
- cat —header(为每个文件输出文件名): tail -n+1 已经可以实现此功能。
- cat -S to squeeze lines just containing blank chars: Existing tools like
sed 's/^ *$//' | cat -swere thought sufficient.- cat -S(压缩仅包含空白字符的行): 现有的工具如
sed 's/^ *$//' | cat -s被认为已足够。
- cat -S(压缩仅包含空白字符的行): 现有的工具如
- cat -d,—direct to use direct I/O: dd has the ‘nocache’ or ‘direct’ options and there are general nocache wrappers.
- cat -d,—direct(使用直接 I/O): dd 已经拥有 ‘nocache’ 或 ‘direct’ 选项,且存在通用的 nocache 包装器。
chmod
- chmod maintains ctime when permissions unchanged: The proposed patch was deemed inefficient.
- chmod 在权限未更改时保持 ctime: 提议的补丁被认为效率低下。
- chmod -d to set perms on just directories: The ‘X’ mode, or
findwithchmodwas deemed sufficient.- chmod -d(仅设置目录权限): ‘X’ 模式或结合
find与chmod被认为已足够。
- chmod -d(仅设置目录权限): ‘X’ 模式或结合
- chmod +S to set setgid on just directories:
findin combination withchmodwas deemed sufficient.- chmod +S(仅在目录上设置 setgid): 结合
find与chmod被认为已足够。
- chmod +S(仅在目录上设置 setgid): 结合
- chmod -D to set perms on just directories: The ‘X’ mode, or
findwithchmodwas deemed sufficient.- chmod -D(仅设置目录权限): ‘X’ 模式或结合
find与chmod被认为已足够。
- chmod -D(仅设置目录权限): ‘X’ 模式或结合
- chmod —parents: Doing this with a simple script or with find was deemed sufficient.
- chmod —parents: 使用简单的脚本或 find 命令即可实现。
- chmod —umask: The existing chmod options were deemed sufficient.
- chmod —umask: 现有的 chmod 选项被认为已足够。
- chmod b10111: Binary conversion can be done easily in bash or ksh.
- chmod b10111: 二进制转换在 bash 或 ksh 中很容易完成。
- disallow chmod to create world writable files: This couldn’t be general, and even so could be easily bypassed.
- 禁止 chmod 创建全局可写文件: 这无法做到通用,且很容易被绕过。
cp
- cp,mv —to: Though better than —target it wasn’t warranted to have two ways to do it.
- cp,mv —to: 虽然比 —target 更好,但没有必要提供两种实现方式。
- unicode symbols for cp,mv —verbose: Rejected for same reasons as UTF-8 arrows in ls output.
- cp,mv —verbose 的 Unicode 符号: 因与 ls 输出中的 UTF-8 箭头相同的原因被拒绝。
- distinguished symbols for cp,mv —verbose: It was deemed there was enough info from the context.
- cp,mv —verbose 的区分符号: 被认为上下文信息已经足够。
- cp,mv —progress: Existing tools cater for this already.
- cp,mv —progress: 现有工具已经满足此需求。
- cp —reflink-range=src_offset,src_length,dst_offset: The was not deemed warranted.
- cp —reflink-range=…: 被认为没有必要。
- cp —quiet: Suppressing ENOENT errors can be done by filtering existing files first.
- cp —quiet: 抑制 ENOENT 错误可以通过先过滤现有文件来实现。
- cp —resume: Use rsync.
- cp —resume: 请使用 rsync。
- cp —parallel: While this helps copy speed in some situations, the fix is probably best handled at a lower level.
- cp —parallel: 虽然在某些情况下有助于提高复制速度,但该修复最好在更底层处理。
- cp —preserve=all should copy ext2 extended attributes: Would need file system agnostic interface (like copyfile()).
- cp —preserve=all 应复制 ext2 扩展属性: 需要一个与文件系统无关的接口(如 copyfile())。
- cp,mv —bwlimit to throttle data transfer rates: This is better suited to higher level tools, and is available in rsync.
- cp,mv —bwlimit(限制数据传输速率): 这更适合高层工具,且 rsync 已提供此功能。
cut
- cut -d ‘string’:
sed 's/string/\x00/g' | cut -d ''was deemed sufficient.- cut -d ‘字符串’:
sed 's/string/\x00/g' | cut -d ''被认为已足够。
- cut -d ‘字符串’:
- cut —output-delimiter short option: One can already do
cut --ou.- cut —output-delimiter 短选项: 已经可以使用
cut --ou。
- cut —output-delimiter 短选项: 已经可以使用
- cut —csv: A separate util was deemed best for this complicated task.
- cut —csv: 对于这项复杂的任务,使用单独的工具被认为是最好的。
- cut -C: There was no need for this alias for —complement (—co).
- cut -C: 没有必要为 —complement (—co) 设置此别名。
- cut -f2,1 to reorder fields: Using awk or join is deemed sufficient.
- cut -f2,1(重排字段): 使用 awk 或 join 被认为已足够。
- cut —separator to specify the “line” delimiter: Pre/Post-processing with tr was deemed sufficient.
- cut —separator(指定“行”分隔符): 使用 tr 进行预处理/后处理被认为已足够。
date
- date +%f to flush output:
stdbuf -oL date ...was deemed sufficient.- date +%f(刷新输出):
stdbuf -oL date ...被认为已足够。
- date +%f(刷新输出):
- date should parse ‘DAY MONTH, YEAR’ format: The format was deemed erroneous.
- date 应解析 ‘DAY MONTH, YEAR’ 格式: 该格式被认为是有误的。
- date +%J to support astronomical julian date: This was not thought common enough to support.
- date +%J(支持天文儒略日): 被认为不够通用,无需支持。
- date -v to provide BSD syntax relative date adjustments: The existing GNU relative date syntax was thought sufficient.
- date -v(提供 BSD 语法相对日期调整): 现有的 GNU 相对日期语法被认为已足够。
dd
- I/O throughput limitation for dd: pv and rsync et. al. were deemed better for this.
- dd 的 I/O 吞吐量限制: pv 和 rsync 等工具被认为更适合此功能。
- dd —limit-speed: It was thought best to leave this to tools like pv or trickle.
- dd —limit-speed: 最好留给 pv 或 trickle 等工具处理。
- dd conv=noerror should apply to writes as well as reads: shred is best used for this use case.
- dd conv=noerror 应同时应用于写入和读取: shred 最适合此用例。
- dd iflag=seekable oflag=seekable to verify lseek(2) support: The feature was not deemed useful/complete enough.
- dd iflag=seekable oflag=seekable(验证 lseek(2) 支持): 该功能被认为不够有用或不够完善。
- dd conv=offload to offload copying to various backends: This was thought too specialized to support explicitly.
- dd conv=offload(卸载复制到各种后端): 被认为过于专业,无需显式支持。
- dd conv=truncpost: To support filtering files in place. Due to error handling this was not thought useful enough.
- dd conv=truncpost(支持原地过滤文件): 由于错误处理问题,被认为不够有用。
df
- df,du -g: Specifying “Gigabyte” output format is neither standard or required.
- df,du -g: 指定“千兆字节”输出格式既不标准也不必要。
- df autoscale: df -h was thought good enough.
- df autoscale(自动缩放): df -h 被认为已足够。
- df -g: Separate options for various output units is best avoided.
- df -g: 最好避免为各种输出单位设置单独的选项。
- df —without-header: —header options are only really useful for data consumers.
- df —without-header: —header 选项实际上仅对数据消费者有用。
- df —dereference to process symlink targets: df was changed to reference symlink targets unconditionally.
- df —dereference(处理符号链接目标): df 已被更改为无条件引用符号链接目标。
du
- du —format to allow sorting: sort -h handles this.
- du —format(允许排序): sort -h 可以处理此需求。
- accurate du results for OCFS2 reflinked files: It was thought too complicated and specific to add to du.
- OCFS2 reflink 文件的准确 du 结果: 被认为太复杂且过于具体,不适合添加到 du 中。
- du —exclude-dirs to exclude directories themselves from the usage count: find .. | du was thought sufficient.
- du —exclude-dirs(从使用统计中排除目录本身): find .. | du 被认为已足够。
- du —sort to sort by disk usage: This is already supported directly by
du -h | sort -h.- du —sort(按磁盘使用量排序): 这已经可以直接通过
du -h | sort -h实现。
- du —sort(按磁盘使用量排序): 这已经可以直接通过
join
- Auto detect output format for join: We need to consider further whether this is useful.
- 自动检测 join 的输出格式: 我们需要进一步考虑这是否有用。
- join more than two files: It would add complexity while not being scalable.
- join 超过两个文件: 这会增加复杂性且不可扩展。
- join more than one field: There wasn’t much interest in this.
- join 超过一个字段: 对此需求兴趣不大。
- comm,join —parallel to use multiple cores: It was thought best to split the data for multiple processes.
- comm,join —parallel(使用多核): 最好将数据拆分给多个进程处理。
- join -t ‘\t’ to use a TAB delimiter: Using the shell to specify the TAB char like
join -t $'\t'was thought ubiquitous enough.- join -t ‘\t’(使用 TAB 分隔符): 使用 shell 指定 TAB 字符(如
join -t $'\t')被认为已足够普及。
- join -t ‘\t’(使用 TAB 分隔符): 使用 shell 指定 TAB 字符(如
ls
- Change/revert the default quoting style: please see the ls quotes page for details.
- 更改/恢复默认引用样式: 请参阅 ls quotes 页面了解详情。
- UTF-8 arrows in ls: See this l script as an alternative.
- ls 中的 UTF-8 箭头: 请参阅此 l 脚本作为替代方案。
- df/ls —blocksize={decimal,binary}: Though more correct, it was deemed overkill.
- df/ls —blocksize={decimal,binary}: 虽然更准确,但被认为是过度设计。
- ls —sort=class: Sorting by type indicator was deemed of marginal benefit.
- ls —sort=class: 按类型指示符排序被认为收益甚微。
- ls —octal to output octal permissions: Using stat or find is deemed sufficient.
- ls —octal(输出八进制权限): 使用 stat 或 find 被认为已足够。
- ls —group-numbers=locale to output thousands separators: BLOCK_SIZE or numfmt were deemed sufficient.
- ls —group-numbers=locale(输出千位分隔符): BLOCK_SIZE 或 numfmt 被认为已足够。
- Suppress trailing slash with ls -F /: The result was deemed too inconsistent.
- 使用 ls -F / 抑制尾部斜杠: 结果被认为太不一致。