mirror of https://github.com/cheat/cheat.git
Add cheatsheet for cp backup file with date
This commit is contained in:
parent
cdf573a725
commit
aa4f6daf77
|
@ -6,3 +6,6 @@ cp -r ~/Desktop/cruise_pics/ ~/Pictures/
|
||||||
|
|
||||||
# Create a copy but ask to overwrite if the destination file already exists
|
# Create a copy but ask to overwrite if the destination file already exists
|
||||||
cp -i ~/Desktop/foo.txt ~/Documents/foo.txt
|
cp -i ~/Desktop/foo.txt ~/Documents/foo.txt
|
||||||
|
|
||||||
|
# Create a backup file with date
|
||||||
|
cp foo.txt{,."$(date +%Y%m%d-%H%M%S)"}
|
Loading…
Reference in New Issue