The dangerous 'find' command

This tweet highlights how using the find command incorrectly can wipe your complete data. The featured screenshot is from AskUbuntu forum website.

find . -name "*.bak" -type f -delete

In the above command, make sure that the -delete is the last argument. If you put it just after find . and before the other things, it will delete everything.

It's very interesting.

Comment on Mastodon

Webmentions

What’s this?