Pages

Friday, September 12, 2014

Create backup copy of file and keep modified date and time

$ cp -p file.txt{,.bak}

Use shell expansion to create a back-up copy (file.txt.bak) of a file (file.txt) and keep the original last modified date and time.




commandlinefu.com


by David Winterbottom (codeinthehole.com)






from All commands http://ift.tt/1tH9ptn

No comments:

Post a Comment