Find and delete all files in directory

find /home/path -maxdepth 9 -type f -name “*.bck” -delete

1 Comment

  • is that a dos command? PS?

    what if the tree is more than 9 deep? can you say 99?

    what are the switches? -type f ? that’s to delete only files? What about deleting the whole tree?


Leave a Reply

Your email address will not be published.