Re: Copy all files and subdirectories preserving time stamp?
Re: freebsd-questions Digest, Vol 74, Issue 3 Message: 14 > 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/ # cp -pR dir1 dir2 works for me. See the note in 'man cp' re hard linked files, though. Ian ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Copy all files and subdirectories preserving time stamp?
At 12:00 8/23/2004, Moti Levy wrote: >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/ >> >> >try using tar , >cd /some/source/directory/ > >tar cfP - *|(cd /some/target/directory/ ; tar xfP - ) Thanks, Moti! I tried this but got an error: tar: You may not specify more than one '-Acdtrux' option So, I googled for: http://www.Google.com/search?q=tar+copy+directories+attributes and found a neat LinuxMafia page. I sucessfully tried this: rsync -av /some/source/directory/ /some/target/directory/ Start Here to Find It Fast! -> http://www.US-Webmasters.com/best-start-page/ $8.77 Domain Names -> http://domains.us-webmasters.com/ ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Copy all files and subdirectories preserving time stamp?
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/ ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]" try using tar , cd /some/source/directory/ tar cfP - *|(cd /some/target/directory/ ; tar xfP - ) ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Copy all files and subdirectories preserving time stamp?
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/ ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"