在 Unix 的字母排序中,所有字母后面都有符号吗?
当我组织目录时,我经常希望某些目录在 ls 中脱颖而出。例如,我有时会有一个名为 #backup#
的目录,它最终会出现在目录列表的顶部,而不是位于以“b”开头的所有目录之间。但有时,我希望目录位于列表的底部,但我还没有找到任何可以实现此目的的符号。 (我得到的最接近的是 z#name#z
,但这并不能完全解决问题。) 那么:在 Unix 的字母排序中,是否有任何符号出现在所有字母之后?
When I organize my directories I often want certain directories to stand out in ls
. For example, I will sometimes have a directory called #backup#
and this will end up in the top of the list of directories, rather than in between all directories starting in "b". Sometimes, though, I want a directory to be at the bottom of the list, but I haven't found any symbol that achieves this. (The closest I've come is z#name#z
, but this doesn't quite cut it.) So: Are there any symbols that come after all letters in Unix's alphabetical sorting?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用任何(例如 ASCII 或 Unicode [这取决于您的编码和本地化])字符,除了 NULL(用作文件路径的结尾)和
/
(用于分隔文件路径中的目录)。请参阅path_resolution(7)。您可能会考虑使用~
因为有几个实用程序(请参阅 缩进(1),mv(1) ....) 采用约定将文件/home/nag/foo
备份为/home/nag/foo~
。 AFAIK#foo#
可以被emacs
用来临时备份已编辑(但未保存)的文件foo
。You can use any (e.g. ASCII or Unicode [it depends upon your encoding and localization]) character except NULL (used as the ending of filepath) and
/
(used to separate directories in file path). See path_resolution(7). You might consider using~
because several utilities (see indent(1), mv(1)....) adopt the convention to backup file/home/nag/foo
as/home/nag/foo~
. AFAIK#foo#
could be used byemacs
to backup temporarily an edited (but unsaved) filefoo
.