Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Aug 2004 13:00:03 -0400
From:      Moti Levy <moti@flncs.com>
To:        "W. D." <WD@US-Webmasters.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Copy all files and subdirectories preserving time stamp?
Message-ID:  <412A2293.9090808@flncs.com>
In-Reply-To: <5.1.0.14.2.20040823115109.04717ec0@209.152.117.178>
References:  <5.1.0.14.2.20040823115109.04717ec0@209.152.117.178>

next in thread | previous in thread | raw e-mail | index | archive | help
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@freebsd.org mailing list
>http://lists.freebsd.org/mailman/listinfo/freebsd-questions
>To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
>  
>
try using tar ,
cd /some/source/directory/

tar cfP - *|(cd /some/target/directory/ ; tar xfP - )



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?412A2293.9090808>