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

How do you repeat a command in terminal?

587


What is rmdir command?

545


What does 'mkdir' command do in UNIX?

654


Which command is used to restrict incoming messages?

586


What is the general format of unix command syntax?

685






What does the “echo” command do?

622


What is the functionality of a top command?

618


What does sed command do in unix?

556


Are you in or at the office?

609


How to display no of records in oracle using unix command?

585


Write a command that will allow a unix system to shut down in 15 minutes, after which it will perform a reboot.

618


What is grep and how do you use it?

569


Explain command to view process running?

609


What is the nmap command?

576


What is unix command?

579