mirror of
https://github.com/Erreur32/cheat.git
synced 2024-10-31 21:11:07 +01:00
d12718b8c4
Appended missing newline to end of `cp` cheatsheet.
12 lines
334 B
Plaintext
12 lines
334 B
Plaintext
# Create a copy of a file
|
|
cp ~/Desktop/foo.txt ~/Downloads/foo.txt
|
|
|
|
# Create a copy of a directory
|
|
cp -r ~/Desktop/cruise_pics/ ~/Pictures/
|
|
|
|
# Create a copy but ask to overwrite if the destination file already exists
|
|
cp -i ~/Desktop/foo.txt ~/Documents/foo.txt
|
|
|
|
# Create a backup file with date
|
|
cp foo.txt{,."$(date +%Y%m%d-%H%M%S)"}
|