Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Macos 可以在Mac OS中显示一些点文件吗?_Macos_.htaccess_Terminal_Hidden Files - Fatal编程技术网

Macos 可以在Mac OS中显示一些点文件吗?

Macos 可以在Mac OS中显示一些点文件吗?,macos,.htaccess,terminal,hidden-files,Macos,.htaccess,Terminal,Hidden Files,我想在我的Mac上(在Finder中)查看.htaccess文件。因此,我从终端启用了ShowAllFiles defaults write com.apple.Finder AppleShowAllFiles YES 它像预期的那样工作,但缺点是我看到了所有的.DS_存储和.localized文件 有没有办法只显示名为.htaccess的文件(将来可能还会显示更多)?一位同事建议将文件隐藏起来,然后使用chflags命令只显示我想要的文件 chflags nohidden.htaccess

我想在我的Mac上(在Finder中)查看.htaccess文件。因此,我从终端启用了ShowAllFiles

defaults write com.apple.Finder AppleShowAllFiles YES
它像预期的那样工作,但缺点是我看到了所有的.DS_存储和.localized文件


有没有办法只显示名为.htaccess的文件(将来可能还会显示更多)?

一位同事建议将文件隐藏起来,然后使用chflags命令只显示我想要的文件

chflags nohidden.htaccess

或递归地在“我的开发”文件夹中:

find ~/ -iname ".htaccess" | xargs chflags nohidden "{}"

希望它能像帮助我一样帮助你们

这实际上是行不通的。如果文件设置了隐藏标志或是点文件,则查找器将隐藏这些文件。你不能通过清除隐藏标志来覆盖它们的文件,甚至一开始都没有设置。