Here is a quick tip, if you wish to perform an unattended download of large files such as a Linux DVD ISO image file use the wget command.
The syntax is as follows for a non-interactive download:
wget -bqc http://path-to-url/linux.iso
You will see a PID on screen:
Continuing in background, pid 12345.
- -b : Go to background immediately after startup. If no output file is specified via the -o, output is redirected to wget-log.
- -q : Turn off Wget’s output aka save disk space.
- -c : Resume broken download i.e. continue getting a partially-downloaded file. This is useful when you want to finish up a download started by a previous instance of Wget, or by another program.
This tip will save your time while downloading large ISO file or any other files from the Internets:
## download a large file in background ## wget -bqc http://bay.uchicago.edu/centos/7.0.1406/isos/x86_64/CentOS-7.0-1406-x86_64-DVD.iso ## Verify it ## ps aux | grep wget ls -lh CentOS-7.0-1406-x86_64-DVD.iso ## [Optional] Stop download by killing by PID number kill PID-HERE ps aux | grep wget
Sample session from above commands:
The nohup command
You can also use the nohup command to execute commands after you exit from a shell prompt. The syntax is:
$ nohup wget -qc http://path-to-url/linux.iso & ## exit from shell or close the terminal ## $ exit
The disown bash command
Another option is to use the disown command as follows:
$ wget -qc http://path-to-url/linux.iso &  10685 $ disown wget $ ps PID TTY TIME CMD 10685 pts/0 00:00:00 wget 10687 pts/0 00:00:00 bash 10708 pts/0 00:00:00 ps $ logout
See disown command examples for more info.
The screen command
You can also use the screen command which is a full-screen window manager that multiplexes a physical terminal between several processes (typically interactive shells).
See alsoTwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!
- 30 Cool Open Source Software I Discovered in 2013
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012
- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop