One badly constructed command that intends to delete files from a folder can cost you your entire hard disk. It's not a nice place to be in. But there are steps you can take to mitigate the risks.
Finding the right command that deletes the files is only half the trick. These things are so dangerous you need to add some sensible protection so they can't be misused, no matter how focused and aware you are when executing the command.
This article gathers a comprehensive list of strategies and checks that can help prevent disasters when bulk deleting files. The examples rely on the
find command, but the principles can be carried over to other commands.