arcee123 arcee123 - 1 year ago 84
Linux Question

how do I remove files when the filename has specific characters from linux folder

I have a folder of images.

the folder looks like below:


How do I delete all files that have the 'x' character leaving only the original ones?


Answer Source

You can use find:

find dir -name '*x*' -delete
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download