How can I find a file with no extension using locate
? Can I pipe it through grep if locate can't do it?
你尝试过这个吗
locate -b fileName
Well this is one way to do it:
locate -b filename | grep -v '\.'
Locate -b
finds only files with that basename, so not filename/something. The grep bit then finds only files with no extension.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.