ftp timestamp


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers ftp timestamp
# 1  
Old 04-15-2003
ftp timestamp

I have written a basic script to ftp files from a local machine to a remote one and put it into a crontab to automate the process as the directory has more files added to it. I also have a cron which periodically removes files from the local directory to stop the filesystem from becoming full. However the after I ftp the file the time stamp changes from the original file.

What I need to know is

(a) Is there any way I can keep the original timestamp
(b) Once the file is ftp'ed accross can I selectively stop it ftping files which have already been transfered.
# 2  
Old 04-16-2003
(a) I don't think so.. When the file is ftp'd to the remote system, it's "creation" time becomes whatever the time is on that system.

(b) Not sure exactly what you mean.. you could delete the file on the local system as soon as it's ftp'd to the remote one.
# 3  
Old 05-02-2003
never tried this but you can tar the file on the host before it is FTPed over. this way, I think only the tar file gets its timestamp updated, not the actual file that is IN the tar file itself.

not sure, try it tho and see if it works
# 4  
Old 05-02-2003
I decided to try it so I zipped a couple files and ftp'ed them to another server .. it worked, the creation times were preserved for the files inside the zip file ..
# 5  
Old 05-03-2003
say what???? so am a genius?? noooooooo, stop playing.

seriously, am happy for you. one day I hope I become the first human UNIX DOCTOR. my logo would be "Is your unix system sick?, if so, COME TO ME, the doctor"

lol
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Grep lines between last hour timestamp and current timestamp

So basically I have a log file and each line in this log file starts with a timestamp: MON DD HH:MM:SS SEP 15 07:30:01 I need to grep all the lines between last hour timestamp and current timestamp. Then these lines will be moved to a tmp file from which I will grep for particular strings. ... (1 Reply)
Discussion started by: nms
1 Replies

2. Shell Programming and Scripting

AIX : Need to convert UNIX Timestamp to normal timestamp

Hello , I am working on AIX. I have to convert Unix timestamp to normal timestamp. Below is the file. The Unix timestamp will always be preceded by EFFECTIVE_TIME as first field as shown and there could be multiple EFFECTIVE_TIME in the file : 3.txt Contents of... (6 Replies)
Discussion started by: rahul2662
6 Replies

3. Shell Programming and Scripting

To check timestamp in logfile and display lines upto 3 hours before current timestamp

Hi Friends, I have the following logfile. Currently time in india is 07/31/2014 12:33:34 and i have the following content in logfile. I want to display only those entries which contain string 'Exception' within last 3 hours. In this case, it would be the last line only I can get the... (12 Replies)
Discussion started by: srkmish
12 Replies

4. Shell Programming and Scripting

Comparison of timestamp on ftp

Hello Need help with shell script There is are files on my ftp. They overwriting every hour from other places. ls -la /home/ftp/ -rw-r--r-- 1 ftp nogroup 2296 2012-08-11 12:59 G1.zip -rw-r--r-- 1 ftp nogroup 6676 2012-08-11 13:00 KRT1.zip -rw-r--r-- 1 ftp nogroup 5169... (3 Replies)
Discussion started by: ck80
3 Replies

5. Shell Programming and Scripting

Identifying files with a timestamp greater than a given timestamp

I need to be able to identify files with file timestamps greater than a given timestamp. I am using the following solution, although it appears to compare files at the "seconds" granularity and I need it at the milliseconds. When I tested my solution, it missed files that had timestamps... (3 Replies)
Discussion started by: nkm0brm
3 Replies

6. UNIX for Dummies Questions & Answers

How to compare a file by its timestamp and store in a different location whenever timestamp changes?

Hi All, I am new to unix programming. I am trying for a requirement and the requirement goes like this..... I have a test folder. Which tracks log files. After certain time, the log file is getting overwritten by another file (randomly as the time interval is not periodic). I need to preserve... (2 Replies)
Discussion started by: mailsara
2 Replies

7. Shell Programming and Scripting

preserving the timestamp of a file when copied from remote server to local server using ftp

Hi, I need to copy few files from remote server to local server. I write a shell script to connect to the remote server using ftp and go to that path. Now i need to copy those files in the remote directory to my local server with the timestamp of all those files shouldnt be changed. ... (5 Replies)
Discussion started by: arunkumarmc
5 Replies

8. Shell Programming and Scripting

FTP timestamp

Hi, I am searching for a way to change the display format of the timestamp from an FTP server. From a SOLARIS 9 server (ksh) I am connecting with a shell script using Ncftp to an FTP remote server. This script is making a list of available files on that FTP server. All files are listed with... (0 Replies)
Discussion started by: Aswex
0 Replies

9. UNIX for Advanced & Expert Users

FTP from windows to Unix maintaining timestamp

Hi, Is it possible to Ftp the files from Windows to Unix while maintaining their timestamp Gaurav (1 Reply)
Discussion started by: gauravgoel
1 Replies

10. Shell Programming and Scripting

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... (2 Replies)
Discussion started by: frustrated1
2 Replies
Login or Register to Ask a Question