Saturday, April 26, 2014

rm

  •   rm command examples
Get confirmation before removing the file.

$ rm -i filename.txt


It is very useful while giving shell metacharacters in the file name argument.

Print the filename and get confirmation before removing the file.

$ rm -i file*


Following example recursively removes all files and directories under the example directory. This also removes the example directory itself.

$ rm -r example

0 comments:

Post a Comment