Hello, I want to download some files which are younger than a given date. How can I do this? I only can use the command line. I tried mget but it seems as if you can either download all files or you can compare agains a loacal file to get the updated files from the ftp server - but I don't have and don't want to have the old files... Any idea? Michael
* Michael Hoeller (MichaelHoeller@t-online.de) [021203 12:28]:
I want to download some files which are younger than a given date. How can I do this? I only can use the command line. I tried mget but it seems as if you can either download all files or you can compare agains a loacal file to get the updated files from the ftp server
Pretty much every utility is going to compare the remote date to the date of a local file. Disregarding the difficulties of converting date formats and time zones, I'd try using zsh's builtin ftp client in a shell script that parses the date info from the 'zfls -l' output and, if the file is newer than some date, copies it with zfcget. Install zsh and see zshzftpsys(1) for more info. Or just mount the filesystem via nfs and use find. -- -ckm
Christopher Mahmood wrote:
* Michael Hoeller (MichaelHoeller@t-online.de) [021203 12:28]:
I want to download some files which are younger than a given date. How can I do this? I only can use the command line. I tried mget but it seems as if you can either download all files or you can compare agains a loacal file to get the updated files from the ftp server
Pretty much every utility is going to compare the remote date to the date of a local file. Disregarding the difficulties of converting date formats and time zones, I'd try using zsh's builtin ftp client in a shell script that parses the date info from the 'zfls -l' output and, if the file is newer than some date, copies it with zfcget. Install zsh and see zshzftpsys(1) for more info.
Thanks for you answer, I forgot one important thing: The machine I have to use for the download is WinNT and I have to use its ftp client. I guess I am down to its commands - am I ? Is there anything I can do with mget? Michael
* Michael Hoeller (MichaelHoeller@t-online.de) [021203 13:01]:
Thanks for you answer, I forgot one important thing: The machine I have to use for the download is WinNT
Yes, that is an important detail.
I guess I am down to its commands - am I ? Is there anything I can do with mget?
Not that I can see. -- -ckm
On Tue, 3 Dec 2002, Michael Hoeller wrote:
Christopher Mahmood wrote:
* Michael Hoeller (MichaelHoeller@t-online.de) [021203 12:28]:
I want to download some files which are younger than a given date. How can I do this? I only can use the command line. I tried mget but it seems as if you can either download all files or you can compare agains a loacal file to get the updated files from the ftp server
Pretty much every utility is going to compare the remote date to the date of a local file. Disregarding the difficulties of converting date formats and time zones, I'd try using zsh's builtin ftp client in a shell script that parses the date info from the 'zfls -l' output and, if the file is newer than some date, copies it with zfcget. Install zsh and see zshzftpsys(1) for more info.
Thanks for you answer, I forgot one important thing: The machine I have to use for the download is WinNT and I have to use its ftp client. I guess I am down to its commands - am I ? Is there anything I can do with mget?
I don't know anything about mget, but perhaps Christopher's advice can be of use to you anyway. If you install Cygwin, you can have zsh on Windows. Go to http://cygwin.com/ for more info. Regards Ole
participants (3)
-
Christopher Mahmood
-
MichaelHoeller@t-online.de
-
Ole Kofoed Hansen