Great little FTP client, but a steeper learning curve from normal GUI based ones. Here are a few commands/references I occasionally use. I’ll try to keep this post up to date as I go.
Connect to server:
(If wanting to connect via SFTP, add it at the start like below)
lftp open sftp://host user USER
It should then ask for a password. You can then
ls and you should see the files.
Download a directory:
(A mirror command downloads multiple files at once and uses segmentation:)
queue mirror -P 5 --use-pget-n=5 Directory
pget -n 5 File.dmg
To delete a transfer from your queue, add the -d switch:
queue -d #
To stop and delete a running transfer, use the
If you set lftp to allow multiple transfers simultaneously,
kill #, where # is the number listed by
kill all will stop and delete all transfers.
If you want your password to be saved when you create a bookmark, use the command:
set bmk:save-passwords true
Edit MAC OS X at: /usr/local/etc/lftp.conf
##MyMods set bmk:save-passwords true alias dir !ls -Fsh --group-directories-first
And a list of aliases:
alias j jobs alias jv jobs -v alias q queue alias qs queue stop alias k kill alias ka kill all alias m mirror -c -P 2 --use-pget-n=5 alias p pget -c -n 6
To do this, use the “bookmark” command.
add <name> [<loc>] del <name> list
Full example of the process
- Navigate in Terminal to the folder you want, then connect to FTP server from that terminal window
- After it connects, it should say
- List all files with
- To download a file from the FTP, type:
q p FILENAME
- NOTE: You don’t have to type the whole file name. Just the start, then you can fill the rest by pushing the tab key.
It’s an easy way to use the FTP server to upload and download files.