Announcement

Collapse
No announcement yet.

Enhanced/better alternative to lftp?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Enhanced/better alternative to lftp?

    I switched from ftp to lftp a long time ago, and while I appreciate lftp's much richer tool set than ftp has, there are still some things that just aren't up to par. For example, on my local machines, assuming a directory named some_directory exists, I can cd some* and end up in some_directory. But if I try the same thing using lftp, I get:

    > cd some*
    cd: Access failed: 550 /[domain].com/[directory]/[subdirectory]/some*: No such file or directory
    The same behavior occurs by using the lcd command to move around on the local drive:

    > lpwd
    /data/media/images/pictures/2011/2012-01-01

    > ! ls -l ..
    drwxr-xr-x 2 grace users 12288 2011-11-30 11:54 2011-11-30
    drwxr-xr-x 3 grace users 4096 2011-12-09 09:58 2011-12-01
    drwxr-xr-x 3 grace users 4096 2011-12-09 09:45 2011-12-09
    drwxr-xr-x 2 grace users 4096 2011-12-13 15:43 2011-12-11
    drwxr-xr-x 2 grace users 4096 2011-12-24 12:33 2011-12-15
    drwxr-xr-x 2 grace users 4096 2011-12-24 12:33 2011-12-17
    drwxr-xr-x 2 grace users 4096 2011-12-24 12:33 2011-12-23
    drwxr-xr-x 2 grace users 4096 2011-12-24 12:40 2011-12-24
    drwxr-xr-x 2 grace users 4096 2011-12-29 13:05 2011-12-29

    > lcd ../*12-29
    ../*12-29: No such file or directory
    There are other issues, too. So I'm wondering if anyone knows of a better/enhanced alternative to lftp? The closer its behavior is to bash, the better. My only requirement is that it's CLI.
    Xenix/UNIX user since 1985 | Linux user since 1991 | Was registered Linux user #163544


    #2
    Re: Enhanced/better alternative to lftp?

    Look at the man page for lftp and search on glob. You'll find:
    glob [-d] [-a] [-f] command patterns

    Glob given patterns containing metacharacters and pass result to given command. E.g. ``glob
    echo *''.

    -f plain files (default)
    -d directories
    -a all types
    Using Kubuntu Linux since March 23, 2007
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Re: Enhanced/better alternative to lftp?

      For cli ftp, I have never found anything better than lftp. I use it to keep about 60 web sites synchronized with my local machine.

      Also check out curlftpfs, you can mount a ftp directory as a file system on your box.

      http://curlftpfs.sourceforge.net/

      Of course if you have ssh access to your remote machines, you could always just ssh into them and use rsync.

      Comment


        #4
        Re: Enhanced/better alternative to lftp?

        Well, crap. I have to admit I'd forgotten all about glob; back when I first started using lftp I read its man page, but since then--when looking for info on using wildcards while changing directories, I was looking for cd-related help. Just tried: glob -d cd some* and ended up where I wanted to be.

        However, as I mentioned, there are other issues, too. For example, there's cat but there's no vi, so I can LOOK at a file's contents but I can't edit them (directly).

        Then there's rm. When I rm -rf DIRECTORY, I intend for the directory and all its subdirectories and files to be removed, no questions asked. But lftp's rm -rf doesn't work that way:

        help rm
        Usage: rm [-r] [-f] <files>
        Remove remote files
        -r recursive directory removal, be careful
        -f work quietly
        Again, I'd like the ftp-related client to behave as much like bash as possible.

        Originally posted by eggbert
        For cli ftp, I have never found anything better than lftp. I use it to keep about 60 web sites synchronized with my local machine.
        When I first started using it, I was amazed how much better it is than ftp. I love its mirror command, which I use for backing up my local machines to the remote ones.

        Also check out curlftpfs, you can mount a ftp directory as a file system on your box.

        http://curlftpfs.sourceforge.net/
        Thanks. That sounds promising.

        Of course if you have ssh access to your remote machines, you could always just ssh into them and use rsync.
        No, there's no ssh access. And one time when I needed to un-tar a file and have it create the appropriate directories/subdirectories, I found that *I* couldn't do it. I contacted the web hosting company and they did it for me...but at 27 years and counting of using *nix, it strikes me as ridiculous that I can't do something like that myself.
        Xenix/UNIX user since 1985 | Linux user since 1991 | Was registered Linux user #163544

        Comment

        Working...
        X