What Does “rm -rf” Command Do In Linux?

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/what-does-rm-rf-command-do-in-linux/
PINTEREST
PINTEREST
INSTAGRAM

rm is very useful command. We can use rm command with different options. The -rf  options are one of the most used options to remove files and folders. In this tutorial we will examine the -rf options and related issues.

Recursive with -r

-r is used for recursive. The default behavior of rm  command is just removing given path contents. If we have multilevel directory hierarchy and we want to remove all of them we should use -r option. We can use -r like below.

Recursive with -R

-R or --recursive  is the same option for recursive. So we can use -R or --recursive the same effect with -r

Force with -f

rm  will try to remove given files and folders but in some cases it can not remove files and folders because of their situations. We can force for the removel with the -f option.

-r and -f As Multiple Options

We can also use -r and -f options with as multiple options in a single command. As we understand that -rf is single expression of the -r and -f options.

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/what-does-rm-rf-command-do-in-linux/
PINTEREST
PINTEREST
INSTAGRAM
LEARN MORE  Useful Linux Commands A System Administrator Should Know