CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Advanced:
how to copy a file and keep the original date

 



fcbman
New User

Jul 12, 2011, 12:32 AM

Post #1 of 2 (2979 views)
how to copy a file and keep the original date Can't Post

Hi,

I'm trying to copy a file (I'm using File::Copy) but the problem is that the copied file is getting the current date.

How can I copy the file and still save the original date? My solution has to work on both Linux and Solaris OSs.



Any help or tip will be great!



Thanks,

Ori


rangarasan
New User

Jul 20, 2011, 1:50 AM

Post #2 of 2 (2576 views)
Re: [fcbman] how to copy a file and keep the original date [In reply to] Can't Post

Hi,

Better you can use,

`cp -p source_file Destination_file`

Cheers,

RangaSmile

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives