Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我得到了文件夹内的文件列表,只需要列出包含单引号的文件名
像 image1'.jpg
我用了
find -regex /home/san/"'.jpg" >> /tmp/output.txt
我在这里想念什么
man find说:
man find
-regex pattern File name matches regular expression pattern. This is a match on the whole path, not a search...
你可能想要:
find /home/san -type f -name "*'*"
如果你只是在寻找包含撇号的文件,你可以使用这个:
find -regex "/home/san/.*'.*"