8 examples for mv

{{ score }}
  # move a file 
mv source_file.txt ~/new/location.txt
        
{{ score }}
  # Move multiple files into a directory
mv file1.txt file2.txt file3.txt destination_folder/
        
{{ score }}
  # move a directory
mv sourceDir destDir
        
{{ score }}
  # Rename a bunch of files all at once:
# (this uses bash for and sed commands as helpers..)

for fname in *.png ; do mv "$fname"  "$(echo "$fname" | sed  's/OldFilenameSubstring/NewFilenameSubstring/')" ; done;

# (replace *.png with whatever you want.)
        
{{ score }}
  # Rename a file
mv old_name.txt new_name.txt
        
{{ score }}
  # Rename a file that starts with '-' (avoids "illegal option --" error)
mv ./-file.txt file.txt
        
{{ score }}
  # move a directory to be a subdirectory
mv sourceDir destDir/sourceDir
        
{{ score }}
  # Rename filename.ext to filename.ext.BAK
mv /path/to/filename.ext{,.BAK}