Unix/Linux Go Back    

Shell Programming and Scripting BSD, Linux, and UNIX shell scripting — Post awk, bash, csh, ksh, perl, php, python, sed, sh, shell scripts, and other shell scripting languages questions here.

ftp - get file and keep original timestamp?

Shell Programming and Scripting

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: 20 May 2016, 9:26 AM EDT
Location: Ireland
Posts: 299
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: 23 October 2017, 10:16 PM EDT
Location: NM
Posts: 11,218
Thanks: 567
Thanked 1,111 Times in 1,025 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 Advisor  
Unix Daemon (Administrator Emeritus)
Join Date: Aug 2001
Last Activity: 26 February 2016, 12:31 PM EST
Location: Ashburn, Virginia
Posts: 9,930
Thanks: 64
Thanked 471 Times in 271 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

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 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

All times are GMT -4. The time now is 03:34 AM.