Unix/Linux Go Back    

Shell Programming and Scripting Unix shell scripting - KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and shell scripts and shell scripting languages here.

ftp - get file and keep original timestamp?

Shell Programming and Scripting

Closed Linux or Unix Question    
Thread Tools Search this Thread Display Modes
Old Unix and Linux 03-15-2006
frustrated1 frustrated1 is offline
Registered User
Join Date: Aug 2003
Last Activity: 3 July 2015, 12:33 PM EDT
Location: Ireland
Posts: 297
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?

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
Old Unix and Linux 03-15-2006
jim mcnamara jim mcnamara is offline Forum Staff  
Join Date: Feb 2004
Last Activity: 26 November 2015, 3:17 PM EST
Location: NM
Posts: 10,595
Thanks: 372
Thanked 895 Times in 831 Posts
Not with ftp.

You will have to use touch on the file after it has been moved over.
Sponsored Links
Old Unix and Linux 03-15-2006
Perderabo's Unix or Linux Image
Perderabo Perderabo is offline Forum Staff  
Unix Daemon (Administrator Emeritus)
Join Date: Aug 2001
Last Activity: 8 August 2015, 12:06 PM EDT
Location: Ashburn, Virginia
Posts: 9,931
Thanks: 64
Thanked 453 Times in 265 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 Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux 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 04: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 05:48 PM
Getting a relative timestamp from timestamp stored in a file vaibhavkorde Shell Programming and Scripting 1 04-27-2011 07:08 AM
How to get the original create timestamp? aster007 UNIX for Advanced & Expert Users 3 08-20-2008 11:08 AM
ftp files -- but keep the original timestamp Perderabo Answers to Frequently Asked Questions 0 07-23-2006 12:43 PM

All times are GMT -4. The time now is 10:47 PM.