![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Sync Time/date with NTP server | Sunguy222 | UNIX for Advanced & Expert Users | 2 | 05-15-2008 06:04 AM |
| Processing a log file based on date/time input and the date/time on the log file | primp | Shell Programming and Scripting | 4 | 03-16-2008 08:23 AM |
| Transfer file from local unix server to remote server | indira | Shell Programming and Scripting | 2 | 05-03-2007 03:35 AM |
| Transfer file from local unix server to remote server | indira | HP-UX | 2 | 05-02-2007 02:15 PM |
| how do I put a date and time in a file name | jhamm | UNIX for Dummies Questions & Answers | 2 | 01-16-2007 06:31 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
I would like to know if there is a way to get the date and timestamp of the file that is being FTP from the remote server using shell script. Currently the get command from FTP will have current date and timestamp. Tried the earlier suggestion 'HardFeed' but still getting the current date and time and not the date and timestamp on remote server. Appreciate any help. Thanks
|
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Quote:
It may be possible to do the same if you are doing a pull from the remote system too. |
|
#3
|
|||
|
|||
|
FTP - Get the file date and time on the remote server
Basically when trying to get a file from remote server, it will be a 'get' (pull). But I need to get the file with the date and timestamp which is on the remote server. So it is a pull from the remote server, but gets the file with current date and timestamp on it and not the date and timestamp on the remote server. I need to know how this can be achieved using shell script. Thanks
|
|
#4
|
||||
|
||||
|
#5
|
||||
|
||||
|
A complete solution is not possible and an incomplete solution would break the "freshen" feature in HardFeed. The date format changes for older files. The time is replaced with the year. HardFeed then has no time to parse. So it sets the time to "0000" making it seem that the file was created at midnight. If the local and remote copies are both old, the local timestamp will not be later than the remote timestamp and the file will be retrieved. This means that superfluous file retrieves can sometimes happen when both the local and remote copy have aged enough that the time is replaced by the year. After one superfluous retrieve this will never happen again. If HardFeed set the timestamp of the local file back to the past, this would cause older files to be retrieved on every run.
|
|
#6
|
|||
|
|||
|
vgersh99,
As suggested in comp.unix.shell, rcp is not an option, Since you need to have privilege on the remote server which is handled by other group. |
|
#7
|
||||
|
||||
|
is 'tar' an option as suggested?
|
||||
| Google The UNIX and Linux Forums |