Search code examples
commandrm

How to delete all exe in a pendrive in linux


There are a lot of exe files in my pen-drive (reside in different directories).

How can I delete all the files using Linux command?


Solution

  • Removes all exe files in the current directory tree.

    find . -name "*.exe" -delete
    

    If your pen drive has more than 2 directory , then you need to run this command in each directory.