transferring files using ftp but mantaining the dates


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting transferring files using ftp but mantaining the dates
# 1  
Old 11-22-2005
transferring files using ftp but mantaining the dates

Hi guys,

Is there a way I can ftp some files without changing the last-modified dates from them ?

I haven't seen any ftp option to do so.
Or, alternatively, how do I change the last-modified date for a file, if this is possible... ?


Thanks in advance,
Abrahao.
# 2  
Old 11-23-2005
Hi Abrahao,

I think u can better tar the files , ftp it and untar it at the other end ... and the timestamp would be preserved ... try this way ... i guess this wud be better than changing the timestamp manually

SNS
This User Gave Thanks to Sabari Nath S For This Post:
# 3  
Old 11-23-2005
Abrahao,

You can use rcp command instead to retain modification times access times and modes of the original file. (Use rcp -p)

If you want to change access/modification times use touch command.
touch -m <date-time> <filename>

Regards,
Rajeshwar.
This User Gave Thanks to rajeshwar_ancha For This Post:
# 4  
Old 07-23-2006
Quote:
Originally Posted by Sabari Nath S
Hi Abrahao,

I think u can better tar the files , ftp it and untar it at the other end ... and the timestamp would be preserved ... try this way ... i guess this wud be better than changing the timestamp manually

SNS
Hi Sabari,

When I FTP GET the file from my (tp) trading partner's server the files are not in tar format. The only access I have to my tp's server is ftp. So I cannot really tar my tp's file. I will ask my tp to tar the file before I FTP GET it. But what if my tp does not want to tar the file? What should I do?

Thanks in advanced,
XZOR
# 5  
Old 07-23-2006
Second time in a week for this question. So I created a new faq article.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Transferring files to directories

I have a large number of files with file names of the format iv.epoz.hhe.d.2018.028.000000.sac iv.epoz.hhn.d.2018.028.000000.sac iv.epoz.hhz.d.2018.028.000000.sac iv.epoz.hhe.d.2018.029.000000.sac iv.epoz.hhn.d.2018.029.000000.sac iv.epoz.hhz.d.2018.029.000000.sac... (4 Replies)
Discussion started by: kristinu
4 Replies

2. AIX

Rcp error while transferring files

i am trying to use a rsh script that uses the rcp command to copy files from server to server but it always produce the following error: HOSTNAME: protocol failure due to unexpected closure from server end Error: failed to copy /test to HOST2 system Error: failed to execute command on remote... (5 Replies)
Discussion started by: Portabello
5 Replies

3. Linux

Get all the files from a FTP location with previous week's dates in the file names using Linux

I have a weird requirement where I have to get the files from a FTP(Lets say FTP1) location and place it on my current FTP(Lets say FTP2) location. The issue is, these are daily files (in a pattern Sales_YYYYMMDD_report.csv) and are placed every day on FTP1 and my process usually runs on Monday(eg.... (2 Replies)
Discussion started by: dhruuv369
2 Replies

4. Shell Programming and Scripting

Script for transferring files

Hi Guys, I have to transfer a few files in my system . The commands to be used are as follows . Will it be possible to send the output of the following in the form of a mail . cd /export/home/teja ls -lrt Quote.java* mv Quote.java Quote.java.20121023 cp /tmp/Quote.java . ls -lrt... (2 Replies)
Discussion started by: Ravi_Teja
2 Replies

5. UNIX for Dummies Questions & Answers

Transferring files from one linux server into another

Hello , I want to transfer files from one linux server into another , I got it working using SCP command , but I have to type in password for each and every file . All the remote severs have the same password , so is there a way that I can transfer all these files by typing my password only once ? (5 Replies)
Discussion started by: RaviTej
5 Replies

6. Shell Programming and Scripting

Deleting File from FTP and Transferring File to FTP

Hi, I am getting error when i am deleting file from FTP and also transferring file from local to FTP server. I am getting 221 error. I am getting this error some time only. Some time the existing file from FTP is deleted and file from local directory is transferred to FTP server. ... (2 Replies)
Discussion started by: praka
2 Replies

7. AIX

Transferring files between Windows and AIX

How do I transfer Plain Text and/or BMP image files between my WindowsXP PC and my AIX 4.1 PowerPC? I have no network or USB options, just a Floppy disk drive and a CD drive on each machine. Is it possible at all? Any help would be gratefully received:) (7 Replies)
Discussion started by: Pennant Man
7 Replies

8. Shell Programming and Scripting

FTP - To handle error while transferring files

Hi, I had written an FTP script where in I loop through the directories and transfer the files from each and every directory of Windows to UNIX. Now the problem is when 1. The connection is unable to be established I should return some error codes 2. When there is some system... (1 Reply)
Discussion started by: mahalakshmi
1 Replies

9. Shell Programming and Scripting

FTP session expiring when transferring files... Need some solution

Hi All, I am running a ftp script which is running fine even with crontab. But the problem is that when I connect to ftp server and transfer files , i observe that ftp session expires after few minutes and the file transfer is not completed as there are alot of files to be transfered . ... (4 Replies)
Discussion started by: aarora_98
4 Replies

10. IP Networking

Transferring data to a windows environment using ftp

I need to transfer data from SCO Unix to a windows 2000 or 98 machine. The files are too big for doscp, and I can't get the right programs for transferring via kermit. So the next step, though perhaps more difficult, would be to set up an ethernet network and tranfer the data using ftp. I have... (3 Replies)
Discussion started by: ccs8217
3 Replies
Login or Register to Ask a Question