What difference does the backslash make in the below syntax to remove a UNIX directory having contents?

StackOverflow https://stackoverflow.com/questions/13976037

Pregunta

I need to delete a directory that contains several sub-directories and files. After googling and looking at the man pages of rmdir and rm, I have these two alternatives:

$ rm -rf <folder_name> and $ \rm -rf <folder_name>

How do these two differ?

¿Fue útil?

Solución

Using \ implies that you want your shell to ignore any aliases based on this command

Let's say you have an alias like this one:

alias rm='rm -i'

You would very much like to ignore it if you want to rm your whole /.

Good luck

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top