+1 vote
in Linux by
What is the difference between “rm” and “rm –r”?

1 Answer

0 votes
by

“rm” command is used to delete all the files while “rm –r” command is used to delete all the files in a directory and also in subdirectories.

For Example,

rm file.txt: It will delete the file with name file.txt

rm –r directory: It will remove directories and subdirectories and also their contents.

Related questions

+1 vote
asked Feb 17, 2021 in Linux by SakshiSharma
+1 vote
asked May 11, 2021 in Linux by rajeshsharma
...