我知道如何在终端中显示和隐藏隐藏文件 - 但是有没有办法在显示隐藏文件时隐藏某些文件,例如 .DS_STORE?可以这么说,使某些文件 super 隐藏吗?
最佳答案
将 chflags
与隐藏选项一起使用
ie: chflags hide fileToHide
从 Finde 中隐藏文件
和chflags nohidden fileToHide
来显示文件
请记住手册页中的警告:
Only a limited number of utilities are chflags aware. Some of these tools include ls(1), cp(1), find(1), install(1), dump(8), and restore(8). In particular a tool which is not currently chflags aware is the pax(1) utility.
这意味着,虽然您不会在 Finder 或打开/保存对话框中看到它,但终端仍然会看到它,并且可能会看到其他不尊重 BSD 标志的程序。
关于macos - OSX - 始终隐藏某些文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/393868/