mv -- remove files or directories

  1. Options
    • -I -- interactive.  Prompt to verify that you want to remove each file
    • -F -- force. Never prompt
    • -r -- recursive.  Go through every subdirectory beneath the starting point.
    • -v -- verbose. Explain what is being done.
  2. Usage:  rm [options] [filename]
  3. rm Examples
    • rm  myfile           
      • Remove “myfile”
    • rm -i /backup/*.gz
      • Remove gzipped files from /backup, prompting to confirm each file deletion.
    • rm -rf *
      • Do not EVER use this command!  Whatever directory you are in, everything from that point down will be deleted. 
      • That means, if you are in your /home/[user] directory, everything will be deleted. If you have a directory that you know can be deleted, use rm -rf ./[dir_to_be_deleted]/*
      • If you are root, it means that every file from that point, whether you own it or not, will be deleted. If you really want to use that command as root, please make sure your backups are current.