Pages

Monday, March 2, 2015

Backup file, create dir and set perms in one shot

$ install -m 0400 foo bar/

Prior to working on/modifying a file, use the 'install -m' command which can both copy files, create directories, and set their permissions at the same time. Useful when you are working in the public_html folder and need to keep the cp'd file hidden.




commandlinefu.com


by David Winterbottom (codeinthehole.com)






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

No comments:

Post a Comment