Copy all files and subdirectories preserving time stamp?
Moti Levy
moti at flncs.com
Mon Aug 23 10:00:11 PDT 2004
W. D. wrote:
>Hi folks,
>
>What would be the way to copy all files and subdirectories
>from one directory to another--preserving the time stamp
>and other attributes?
>
>It seems that 'cp' usually puts a time stamp of the
>current date and time.
>
>Would this work?
>
>cp -r -p -@ /some/source/directory/* /some/target/directory/
>
>
>
>Thanks for your help!
>
>Start Here to Find It Fast!™ -> http://www.US-Webmasters.com/best-start-page/
>$8.77 Domain Names -> http://domains.us-webmasters.com/
>
>_______________________________________________
>freebsd-questions at freebsd.org mailing list
>http://lists.freebsd.org/mailman/listinfo/freebsd-questions
>To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
>
>
try using tar ,
cd /some/source/directory/
tar cfP - *|(cd /some/target/directory/ ; tar xfP - )
More information about the freebsd-questions
mailing list