This is the final part of this series and we'll learn how to connect to a ftp site when we are behind a proxy or firewall, scheduling tasks with at command and queuing jobs with queue command.
Connect to an ftp site, through a http proxy
$ vim .bashrc
Go at the end of the file with Shift-g and add
export ftp_proxy = http://user:passwd@servidor-proxy:puerto
export http_proxy = http://user:passwd@servidor-proxy:puerto
Exit from vim with
$ source .bashrc && lftp user:passwd@sitio-ftp
Also you can view: lftp behind a proxy
alias ls 'ls -a'
Now every time you execute ls command, ls will displays all files, including the hidden ones
Executing a command at specific time
Very useful option to download big files in less traffic hours. It starts at 20:00 hours the downloading process of the iso of NetBSD.
> at 20:00 -- get NetBSD-7.0.1-amd64.iso
Run a command in background
When you run the above command, we can not do any operations on the ftp server until the transfer is done, hence the convenience to run it in background
> at 20:00 -- get NetBSD-7.0.1-amd64.iso&
Execute commands sequentially
First download the file my-dvd.iso and then removes it from the ftp site.
> queue get mi-dvd.iso
> queue rm mi-dvd.iso
See jobs that are in the background or in the queue
Serie(s): lftp a sophisticated ftp client, 4 (4)
- lftp a sophisticated ftp client - exploring the site
- lftp a sophisticated ftp client - file handling
- lftp a sophisticated ftp client - directories handling
- lftp a sophisticated ftp client - advanced options