1. wget
Wget is a free tool for automatically downloading files from the network. It supports downloading through HTTP, HTTPS, and FTP, and can use HTTP proxy.
Command Format: wget [options] [URL]
2. scp (mutual copy between servers)
The scp command is the most convenient and useful command in SSH. Imagine directly transferring files between two servers. Simply use scp to solve this problem.
You can run scp servername:/home/ftp/pub/file1 as root on a server. /Then, the file/home/ftp/pub/file1 on the other server is directly transferred to the current directory of the machine.
Of course, you can also use scp/tmp/file2 servername:/boot to send the local file/tmp/file2 to the/boot directory of another machine. The entire transfer process is still encrypted using SSH.
Scp is secure copy, which is used to copy remote files. Data transmission uses ssh and uses the same authentication method as ssh to provide the same security guarantee. Unlike rcp, scp requires you to enter a password or password for verification.
The general format can be abbreviated as "target location of the scp-r source file:" copying the source file to the target location. The-r option is used when copying directories.
(1) scp-r live/zhaolincheung@db-feiyan.db01.baidu.com:/home/bugfixpcui/app/search/video/
Transfer the local live directory to the/home/bugfixpcui/app/search/video/directory of another zhaolincheung@db-feiyan.db01.baidu.com machine.
(2) scp-r ala-common/zhaolincheung@db-feiyan.db01.baidu.com:/home/bugfixpcui/app/search/video/
Send the local ala-common directory to the/home/bugfixpcui/app/search/video/directory on another zhaolincheung@db-feiyan.db01.baidu.com machine.
(3) scp zhaolincheung@192.168.11.22:/home/abc/file1.php ./
Copy the/home/abc/file1.php file on the remote machine 192.168.11.22 to the current directory. After the command is executed, enter the password of the user zhaolinchueng.
3. ps aux
Common ps command parameter process view command, you need to master some of the most common command parameters. The three most common parameters are u, a, and x.
A displays all processes on the terminal, including those of other users. X shows the process without any control terminal. U user name.
4. cp: Copy directory
Cp-r/usr/xu/usr/liu/copy all the files and Their subdirectories in the/usr/xu directory to the/usr/liu directory.
5. mv: Change the directory or file name
Mv/home/abc/home/abcd
6. find: find a file containing a keyword in a directory.
Find.-name '*. *' | grep "*.*"
7. rm: delete a directory
Rm-rf directory name
8. tail: view the last lines of the file.
Tail file name: indicates the last 10 lines of the file.
There is a very useful parameter "-f". When this parameter is used, tail will not return the end signal unless we interrupt it on our own. On the contrary, it will wait for a while until it finds that the data is added to a new row after it is read for the last time, that is, it will track all updates of this file in real time at a certain time. Eg: tail-f file
Another parameter of tail is-n, which is used to view the last N rows. For example, tail-n 100 file indicates the last 100 rows of the file.
9. rz and sz: File Transfer between linux and windows
Rz-be: Upload windows objects to linux. Running this command will pop up a file selection window, from the local selection file upload to the server.
Sz: download files from linux to windows. The file will be downloaded to the default download directory in secure crt. For example:
Sz-be ui.tar.gz: Download ui.tar.gz to your local machine.
Note:
Configure the upload/download Directory: select a "session tag"> "session options"> "terminal"> "X/Y/Zmodem ", then you will see the upload and download directories, which can be set here.