in reply to FTP Grep?

The FTP standard doesn't support inspecting the contents of remote files, It is purely for File Transfer as the name suggests.

You'd need a remote logon (eg. ssh) or a custom app on the remote machine.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP PCW

Replies are listed 'Best First'.
Re^2: FTP Grep?
by Anonymous Monk on Aug 06, 2009 at 07:24 UTC
    I am not looking to search inside the files. I am looking to get files of a certain name. Is that not possible?
      I am not looking to search inside the files.

      ... then describing your requirements as "grep" is misleading.

      Typically, you would use the FTP command mget monk*, but Net::FTP doesn't seem to support that (although it is not listed as unsupported either?).

      If all the files you want will be in a single directory, you might do an ls or dir command to retrieve the file list, then filter that yourself and issue get commands for each.


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
        ... then describing your requirements as "grep" is misleading.

        I wouldn't say so. IMHO, the OP clearly indicated that s/he wanted to grep the fileNAMES.

        There lies some irony that for filtering the filenames, grep is likely be used.

        you would use the FTP command mget monk*, but Net::FTP doesn't seem to support that

        It halfway does. You have the member function cmd which, as I understand, can be used to issue any FTP command, and you can use supported to see whether a particular command is supported by the FTP server.

        -- 
        Ronald Fischer <ynnor@mm.st>