what is the meaning of this command rm -rf /
what will it do ?
Answers were Sorted based on User's Feedback
Answer / chitra
rm -rf removes the directory recursively and also forcefully.
r stands for recursively
f stands for forcefully
The above command can also be used for removing a file.
| Is This Answer Correct ? | 25 Yes | 0 No |
Answer / monu verma
It will remove a directory including its subdirectories and
files
| Is This Answer Correct ? | 24 Yes | 0 No |
Answer / sailesh k
recursively forcely delete the objects even the subfolders
contains any files.
| Is This Answer Correct ? | 14 Yes | 0 No |
Answer / bharath kumar
this is used to delete the directoy even it is containing
files or sub folders.......
| Is This Answer Correct ? | 7 Yes | 0 No |
Answer / 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 |
How can we use grep command in unix?
What are file commands?
Write a grep (or grep) command that selects the lines from a file that have exactly three characters.
How do you create a file in UNIX
36 Answers Accenture, EMG, Nokia, QA, TD,
to list a particular line in the file
Can you explain a little bit about command substitution?
How to identify whether a file is normal file or directory?
Is there a way to erase all files in the current directory, including all its sub-directories, using only one command?
Write a command to display a file’s contents in various formats?
Which command is used to delete all files in the current directory and all its sub-directories?
How can you create a symbolic link to a file or directory?
what will be the output of ls ~/..