Can FTP programs find text inside files?

Discussion in 'Mac Apps and Mac App Store' started by mcivalleri, Jan 4, 2009.

  1. mcivalleri macrumors newbie

    Joined:
    Jan 4, 2009
    #1
    Hi all,
    I have thousands of files on a server, and sometimes I need to find a particular file, but while I don't know the files name or location, I do typically know some of the text that resides in the file. (typically these are xml, php, and html files)
    I have used Fetch, Captain FTP, and Transport. But I have not seen a way to do this with these programs, only search for filename. But I need search by "content".

    Is there indeed any way to do this, and any program that has this ability?

    Or, alternately, is there a way to do this server-side using a search somehow (it's a RedHat Linux server/Apache/MySQL/MyPHPadmin). I'm not as familiar yet with Unix, just barely get by, but learning every week. I use Mac (10.5) at home, on mac pro, Windows (XP) at work...but usually need this feature at home with my Mac.

    Thanks.
     
  2. old-wiz macrumors G3

    Joined:
    Mar 26, 2008
    Location:
    West Suburban Boston Ma
    #2
    The FTP protocol provides no provision for examining the contents of a file, much less searching for anything in it. You would need something on the server side, since the only way you could do it away from the server is to read each and every file one by one, which is an unrealistic task. A large server can have tens of thousands of files, and you can't possibly do something from the client side to search for data without some form of index.
     
  3. mcivalleri thread starter macrumors newbie

    Joined:
    Jan 4, 2009
    #3
    Thanks for the info. I did a search to find a command I could use server-side, that would find text within files/directories, and I came across the "egrep" command for Linux...so I'm learning what that can do. But it's good to narrow my scope to what's possible, so thanks for ruling out FTP.
     
  4. old-wiz macrumors G3

    Joined:
    Mar 26, 2008
    Location:
    West Suburban Boston Ma
    #4
    I used grep a lot when I worked with *nix internals. It is very useful, but it puts a lot of load onto the server. (grep/egrep, whatever). However, you have to give a starting point and if you start in the wrong level, you can miss a lot.
     

Share This Page