Networking Forums

Networking Forums > Computer Networking > Linux Networking > Ftp files filtered by modif date using macdef in .netrc

Reply
Thread Tools Display Modes

Ftp files filtered by modif date using macdef in .netrc

 
 
Liza
Guest
Posts: n/a

 
      04-15-2004, 04:55 PM
Hi,

I need to ftp files with the modification date that is within the last
10 days i.e. files no older than 10 days. I'm using .netrc file and
macdef.
I've played with mtime but couldn't get it write.
Could you please give me a hand here.

Thank you very much.

N.K.
 
Reply With Quote
 
 
 
 
Sybren Stuvel
Guest
Posts: n/a

 
      04-15-2004, 08:46 PM
["Followup-To:" header set to comp.os.linux.]
Liza enlightened us with:
> I need to ftp files with the modification date that is within the last
> 10 days i.e. files no older than 10 days. I'm using .netrc file and
> macdef.


I think you need to play around with the "find" command. If you're not
really bound to FTP you can also toy with "rsync".

Sybren
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself?
 
Reply With Quote
 
Frank da Cruz
Guest
Posts: n/a

 
      04-16-2004, 03:19 PM
On 2004-04-15, Sybren Stuvel <(E-Mail Removed)> wrote:
: ["Followup-To:" header set to comp.os.linux.]
: Liza enlightened us with:
:> I need to ftp files with the modification date that is within the last
:> 10 days i.e. files no older than 10 days. I'm using .netrc file and
:> macdef.
:
: I think you need to play around with the "find" command. If you're not
: really bound to FTP you can also toy with "rsync".
:
Also see the Kermit FTP client:

http://www.columbia.edu/kermit/ftpclient.html

("Flexible File Selection") Documentation:

http://www.columbia.edu/kermit/ckermit80.html#ftp

Particularly the [M]PUT and [M]GET commands:

http://www.columbia.edu/kermit/ckermit80.html#x3.5 (Uploading)
http://www.columbia.edu/kermit/ckermit80.html#x3.6 (Downloading)

Example:

mput /after:-10days *

- Frank
 
Reply With Quote
 
Liza
Guest
Posts: n/a

 
      04-19-2004, 02:43 PM
Sybren Stuvel <(E-Mail Removed)> wrote in message news:<(E-Mail Removed) om>...
> ["Followup-To:" header set to comp.os.linux.]
> Liza enlightened us with:
> > I need to ftp files with the modification date that is within the last
> > 10 days i.e. files no older than 10 days. I'm using .netrc file and
> > macdef.

>
> I think you need to play around with the "find" command. If you're not
> really bound to FTP you can also toy with "rsync".
>
> Sybren


Well, I'm playing with find command and ftp doesn't know what to do
with it.
When I type ls `find -mtime -1` at the linux prompt it works fine.
But how would I use it at ftp prompt? I tried to define a macro with
something like the command above but when I execute it ftp gives me a
"usage: remote-directory local-file" message. Where can i find some
examples of using different commands with FTP? Manual page is of no
help....
Thanks...
N.K.
 
Reply With Quote
 
Sybren Stuvel
Guest
Posts: n/a

 
      04-19-2004, 02:45 PM
["Followup-To:" header set to comp.os.linux.]
Liza enlightened us with:
> Well, I'm playing with find command and ftp doesn't know what to do
> with it.


That is because you're using it as an FTP command, which it isn't.

> When I type ls `find -mtime -1` at the linux prompt it works fine.
> But how would I use it at ftp prompt?


You wouldn't.

> I tried to define a macro with something like the command above but
> when I execute it ftp gives me a "usage: remote-directory local-file"
> message. Where can i find some examples of using different commands
> with FTP?


Again: you don't use it as an ftp command, since it isn't.

If you want to use 'find' to select which files to transfer, use
something like

find -type f -exec ncftpput {} \;

Sybren
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself?
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
NETRC macro not xferring occasional file Matt Linux Networking 0 12-28-2005 07:06 PM
Date Bug in Netgear DG834G Log Files David Wireless Internet 6 07-02-2005 04:08 PM
Date Bug in Netgear DG834G Log Files David Broadband 11 07-02-2005 04:08 PM
.netrc file -syntax error? Doug Laidlaw Linux Networking 2 12-08-2003 11:12 AM
Re: .netrc Vilmos Soti Linux Networking 0 06-25-2003 04:19 AM



1 2 3 4 5 6 7 8 9 10 11