SSH command details

Source: Internet
Author: User
Tags ftp protocol
Rm-rfmydir/* delete mydir directory */cdmydir/* enter mydir directory */cd-/* go back to the upper-level directory */cd ~ /* Back to the root directory */mvtoolstool/* Rename the tools directory to tool */ln-stoolbac/* and create a symbolic link named bac for the tool directory. The most familiar one is

Rm-rf mydir/* delete the mydir directory */
Cd mydir/* enter the mydir directory */
Cd-/* go back to the upper-level directory */
Cd ~ /* Return to the root directory */
Mv tools tool/* Rename the tools directory to tool */
Ln-s tool bac
/* Create a symbolic link named bac for the tool directory. The most familiar thing is that www in FTP is linked to the public_html directory */


Cp-a tool/home/leavex/www/* copy all files in the tool directory to the www directory */
Rm go.tar/* delete the go.tar file */
Find mt. cgi/* find the file named mt. cgi */
Df-h/* check the remaining disk space. it seems unnecessary unless you are too busy */
Tar xvf wordpress.tar/* extract files in tar format */
Tar-tvf myfile.tar/* view files contained in the tar file */
Gzip-d ge.tar.gz/* decompress .tar.gzfile as a .tar file */
Unzip phpbb.zip/* decompress the zip file. it is a bit troublesome to compress a .tar.gz file in Windows */
Tar cf toole.tar tool/* pack the toolcontents as a toole.tar file */
Tar cfz geek.tar.gz tool
/* The size after the Upload file is about 10 MB */

Wget

Wget http://www.example.com/download/wp.tar.gz
/* Download files from the remote server to your server, saving the upload cost. if the server is not M, the bandwidth is m. It is not tens of seconds to download a 2-3 mb mt */
Http://www.example.com/undone.zip wget-c
/* Continue to download the last undownloaded file */

Tar cfz xxxx.tar.gz tool
/* The size after the Upload file is about 10 MB */

There are also some things to use in VIM. let's also list them!

Mobile class:
H/j/k/l: move one cell to the left/bottom/up/right
W: move backward words (how many words are added before the number)
B: move the forward word (how many words are added before the number)
E: move backward to the end of the word
Ge: move forward to the end of the word
$: End of a row
0: Beginning of the line
Tx: Search for x in the row to the right and move it there (to the left in uppercase)
33G: move to the 33rd rows of the file
Gg: first line of the file
G: the end of the file.
33%: 33% of the file
H/M/L: the beginning, middle, and end of the screen.
Zt/zz/zb: Move the current row to the beginning/center/bottom of the screen

Jump:
": Return to the jump location.
CTRL-O: jump to an older place
CTRL-I: jump to a newer place

Search:
/: Search down (add a keyword)
? : Search up (followed by a keyword)
N: The Next matched record

Edit:
I: Switch to insert mode
X: delete the current character
.: Repeat the last modification operation (same as ctrl + f in PS to execute the filter)
U: undo operation
CTRL-R: redo
P: Insert the deleted characters to the current position (put)

Exit and save:
: Q: Exit
: Q! : Do not save and exit
ZZ: Save and exit
: E! : Abandon modification and re-edit

Log out of SSH and continue running!
# Nohup wget http://www.example.net/file.tar.gz &

Wget is a tool used in Linux to extract files from the World Wide Web.
Verifiable
Under the free software, its author is Hrvoje Niksic. Wget supports HTTP and
FTP protocol
Supports proxy server and resumable data transfer to automatically recursive remote host directories and locate the appropriate
Text
And download it to the local disk. if necessary, wget will properly convert the super connection in the page
Local
Generate a browsed image. Because there is no interactive interface, wget can be run in the background, intercepted and ignored
HANGUP signal
Therefore, you can continue running after logging on. Generally, wget is used for batch download.
Internet
Files or remote website images.

Syntax:

Wget [options] [URL-list]
URL format description: you can use a URL in the following format:
Http: // host [: port]/path
For example:
Http://fly.cc.fer.hr/
Ftp://ftp.xemacs.org/pub/xemacs/xemacs-19.14.tar.gz
Ftp: // username: password @ host/dir/file
In the last form, the user name and password are provided for the FTP host in the form of URL encoding (of course, you can also
Use
This parameter is provided, as shown in later ).

Parameter description:

Wget has many parameters, but most applications only need the following common parameters:
-R recursion; for HTTP hosts, wget first downloads the file specified by the URL, and then (if
Parts are
Recursively download all files referenced by this file (hyperjoin)
Parameters
-L specified ). For the FTP host, this parameter means to download all the files in the directory specified by the URL, recursively
Method and
The HTTP host is similar.

-N timestamp: this parameter specifies that wget only downloads the updated files, that is
Of
Files with the same length as the last modification date will not be downloaded.

-M image: equivalent to using both the-r and-N parameters.

-L sets the recursive level. the default value is 5. -L1 is equivalent to non-recursion.-l0 is infinite recursion. note,
When delivered
When the depth increases, the number of files will increase exponentially.

-T sets the number of retries. When the connection is interrupted (or times out), wget tries to reconnect. For example
Result
If-t0 is specified, the number of retries is set to an infinite number.

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.