如何在 OSX bash 上的目录中查找所有非二进制文本文件(具有扩展属性)?
How to find all non-binary text files (with extended attributes) in a directory on OSX bash?
当文件名包含扩展属性时,以下命令无法运行。
cd ~/Library/Containers
find . -type f -name "*.xml"
它什么也没返回。但是
less com.apple.TextEdit/Data/Music/iTunes/iTunes\ Music\ Library.xmlary.xml
xml 文件在那里。
为了跟随目录层次结构中的符号链接,您需要使用 -L
选项 find
:
find -L . -type f -name "*.xml"
当文件名包含扩展属性时,以下命令无法运行。
cd ~/Library/Containers
find . -type f -name "*.xml"
它什么也没返回。但是
less com.apple.TextEdit/Data/Music/iTunes/iTunes\ Music\ Library.xmlary.xml
xml 文件在那里。
为了跟随目录层次结构中的符号链接,您需要使用 -L
选项 find
:
find -L . -type f -name "*.xml"