Log on to the linux console using SSH-Linux Enterprise Application-Linux server application. For more information, see the following. Using SSH to manage linux servers sometimes requires downloading large software or packages, or packaging a 5g folder. How long is that.
Even more troublesome, the connection will be disconnected if the SSH client does not work for a long time during the download, so half of the downloaded content will also die.
Of course, if you say that I can open multiple SSH client windows for operations, I have to say that this is a stupid way.
For example, to package a folder, run the following command:
# Tar zcvf file.tar.gz/path/document /*
If you don't want to wait, put him in the background (add one later &)
# Tar zcvf file.tar.gz/path/document /*&
If you want to return, use the fg command.
We take it for granted that the download is the same.
# Wget http://www.phpv.net/file.tar.gz &
But if you exit SSH after a timeout or something happens, the downloaded file.tar.gz file will also stop...
What should I do? Let's use nohup to complete/
NAME
Nohup-run a command immune to hangups, with output to a non-tty
SYNOPSIS
Nohup COMMAND [ARG]...
Nohup OPTION
DESCRIPTION
Run COMMAND, ignoring hangup signals.
-- Help display this help and exit
-- Version
Output version information and exit
REPORTING BUGS
Report bugs .
SEE ALSO
The full documentation for nohup is maintained as a Texinfo manual. If
The info and nohup programs are properly installed at your site,
Command
Info nohup
Shoshould give you access to the complete manual.
The above is from man nohup.
The usage is simple. Add nohup before the command.
# Nohup wget http://www.phpv.net/file.tar.gz
Nohup: appending output to 'nohup. out'
Not reflected... Lost?
CTRL + Z return to the command line mode...
To avoid the above method, add an & after the command
# Nohup wget http://www.phpv.net/file.tar.gz &
#
Okay. Now let's take a look at how you exit. Everything is done.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.