« Optimizing Node Reference Autocomplete | Main | Tweak REU application form »

December 19, 2011

Copy directories and maintain permissions

After googling it a second time, I usually decide I should just blog it for future reference:

$ sudo cp -rfp ~/Desktop/blah/* /var/blah

the -p is the key

from $ man cp

-p same as --preserve=mode,ownership,timestamps

--preserve[=ATTR_LIST]
preserve the specified attributes (default: mode,ownership,timestamps),
if possible additional attributes: context, links, xattr, all

source

Posted by kkwaiser at December 19, 2011 10:19 AM

Trackback Pings

TrackBack URL for this entry:
http://mblog.lib.umich.edu/mt-bin/mt-tb.cgi/2329

Listed below are links to weblogs that reference Copy directories and maintain permissions:

» nike free run 3 from nike free run 3
The wonderful toms outlet could possibly be the most successful alternative. [Read More]

Tracked on April 26, 2013 10:57 AM

» OaklEy DiSpatcH SunglaSSES from OaklEy DiSpatcH SunglaSSES
Have a great day!I'm very pleased when see your post.I quite endorse your standpoint.I will continue to attention on your blog.I believe that the future I will see more about your ingenious views. [Read More]

Tracked on May 14, 2013 12:01 AM

Comments

Login to leave a comment. Create a new account.