8 examples for cp

{{ score }}
  # Copy directories recursive using the option -r.
cp -r ~/videos/anime/ /media/backup/
        
{{ score }}
  # Copy /home/el/file1.txt to /home/el/file1copy.txt
cp /home/el/file1.txt /home/el/file1copy.txt
        
{{ score }}
  # copy all file but skip existing files (do not overwrite)
cp -vrn ../source/* ./dest/
        
{{ score }}
  # Copy many files to a single target location
cp file_1 file_2 ... file_n target_directory
        
{{ score }}
  # Do hardlinks instead of copying files
cp -al source/ target/
        
{{ score }}
  # Copy a file while preserving permissions
cp -p /file/path/to/source.txt /file/path/to/dest.txt
        
{{ score }}
  # Make a backup copy of filename.ext and name it filename.ext.BAK
cp /path/to/filename.ext{,.BAK}
        
{{ score }}
  # cp is short for copy
# source file is the location
# copy file is the destionation
# cp source_file copy_file