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

Related Posts:

  • wget   wget command examples The quick and effective method to download software, music, video from internet is using wget command. $ wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.2.1.tar.gz … Read More
  • whereis whereis command examples When you want to find out where a specific Unix command exists (for example, where does ls command exists?), you can execute the following command. $ whereis ls ls: /bin/ls /usr/share/… Read More
  • whatis    whatis command examples Whatis command displays a single line description about a command. $ whatis ls ls             (1)  - list directo… Read More
  • uname   uname command examples Uname command displays important information about the system such as — Kernel name, Host name, Kernel release number, Processor type, etc., Sample uname output from a Ubuntu laptop is … Read More
  • vim vim command examples Go to the 143rd line of file $ vim +143 filename.txt Go to the first match of the specified $ vim +/search-term filename.txt Open the file in read only mode. $ vim -R /etc/passwd   &nb… Read More

0 comments:

Post a Comment