what is the meaning of this command rm -rf /
what will it do ?

Answer Posted / sricharan

It is a very good question for a fresher to tackle.

rm -rf
yes ofcourse r stands for recursively
f stands for forcefully
and this is used to remove normalfiles, tarfiles, zip files
etc..

One more important thing is, it can be used in scripts
where in it works/ removes only if the file exists. If we
use rm filename in scripts, it removes if it exits else it
throws error message telling this file not exist. Hence
using rm -rf is better option for shell scripting than rm.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is it called a shebang?

591


Which command should you use to find the remaining disk space in unix server?

720


Who command in unix?

590


What is the function of grep command in unix?

608


What is grep r?

598






Which command is used to kill the last background job?

791


What is a bash command?

634


What do chown command do?

545


How do I run a whois command?

613


Name the general commands in using unix os for a beginner?

634


What is “chmod” command?

579


Why is shebang used?

606


What is difference between grep and find command in unix?

594


What is the command to compare two files in unix?

630


Write a command that will display files in the current directory, in a colored, long format.

695