Someone I used to work with once inadvertently taught a very valuable lesson to a new Linux user who they were on the phone with. He told the user to run a command to remove a directory with some files in it located in their home folder. They were already in their home folder, so he asked them to run:
rm -rf folder_with_files
The customer ran the command with an asterisk thinking they were being clever and saving themselves time typing.
rm -rf part_of_folder_name *
They meant to run something a bit different.
rm -rf part_of_folder_name*
That space meant that they were actually listing two things to delete:
1. A folder that didn’t exist, because the whole folder name was not typed out.
2. Everything else.
Since they were in their home directory, this wiped out their whole home folder.
Let this be a warning to new Linux users.
Rm doesn’t have an undo.
And listen to what you’re being told when you call support.
-
Overand
-
Joe C