在 Unix 的字母排序中,所有字母后面都有符号吗?

发布于 2025-01-04 15:54:25 字数 227 浏览 3 评论 0原文

当我组织目录时,我经常希望某些目录在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

那小子欠揍 2025-01-11 15:54:25

您可以使用任何(例如 ASCIIUnicode [这取决于您的编码和本地化])字符,除了 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 by emacs to backup temporarily an edited (but unsaved) file foo.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文