ftp - get file and keep original timestamp? | Unix Linux Forums | Shell Programming and Scripting

  Go Back    


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

ftp - get file and keep original timestamp?

Shell Programming and Scripting


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 03-15-2006
frustrated1 frustrated1 is offline
Registered User
 
Join Date: Aug 2003
Last Activity: 5 September 2014, 6:44 AM EDT
Location: Ireland
Posts: 296
Thanks: 2
Thanked 1 Time in 1 Post
ftp - get file and keep original timestamp?

Can you ftp (get) a file from another server and keep the timestamp on the file that is on the other server?

ie.
server1
server2 - Mar 12 12:30 /filename1

On Mar 15 at 13:00
server1 ftp to server2 and get /filename1

I want the file filename1 to have the date (Mar 12 12:30) on the file timestamp when it is on my server1...

is this possible?
Sponsored Links
    #2  
Old 03-15-2006
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
 
Join Date: Feb 2004
Last Activity: 25 October 2014, 4:18 AM EDT
Location: NM
Posts: 10,251
Thanks: 283
Thanked 803 Times in 747 Posts
Not with ftp.

You will have to use touch on the file after it has been moved over.
Sponsored Links
    #3  
Old 03-15-2006
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon (Administrator Emeritus)
 
Join Date: Aug 2001
Last Activity: 24 October 2014, 3:06 PM EDT
Location: Ashburn, Virginia
Posts: 9,930
Thanks: 64
Thanked 437 Times in 261 Posts
This question seems to come up a lot...
ftp timestamp
transferring files using ftp but mantaining the dates
FTP - Get the file date and time on the remote server

The first two threads mention creating an archive, tranferring the archive, and extracting the files. The third thread discussed the problem with old files not having a complete timestamp visible to ftp; and it has a perl script that ignores the problem.
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to compare a file by its timestamp and store in a different location whenever timestamp changes? mailsara UNIX for Dummies Questions & Answers 2 07-25-2011 03:48 PM
CSV file:Find duplicates, save original and duplicate records in a new file arvindosu UNIX for Dummies Questions & Answers 8 07-05-2011 04:48 PM
Getting a relative timestamp from timestamp stored in a file vaibhavkorde Shell Programming and Scripting 1 04-27-2011 06:08 AM
How to get the original create timestamp? aster007 UNIX for Advanced & Expert Users 3 08-20-2008 10:08 AM
ftp files -- but keep the original timestamp Perderabo Answers to Frequently Asked Questions 0 07-23-2006 11:43 AM



All times are GMT -4. The time now is 09:24 AM.