diff --git a/cheat/cheatsheets/cp b/cheat/cheatsheets/cp index 3c0e246..5e84c64 100644 --- a/cheat/cheatsheets/cp +++ b/cheat/cheatsheets/cp @@ -6,3 +6,6 @@ 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)"} \ No newline at end of file