Since the working relationship started using the Linux system, after a year of use, now record 9 commands that are not easy to remember but are important.1 su Switch UserSu-root/su root is different, Su-also switches the corresponding user's environment variables2 grep LookupGrep-rn "Hello World"-R recursion-N Display Line number3 Netstat Network informationNetstat-al-A All-L Monitoring-T TCP-U UDP4 PS View
uppercase letters for comparison:3.2 Sort-b FileIgnores all blank parts preceding each line, starting with the first visible character:3.3 Sort-m FileSort by the name of the month, sorting the first 3 letters according to the abbreviation of the Month:3.4 sort-n FileUse "pure numbers" to sort (by default, sort by text type):3.5 sort-r FileReverse Sort:3.6 Sort-u FileThe same data only appears on one line:3.7 sort-t ': '-K 3 fileThe contents are separated by: to be sorted in the third column:3.8
/system/library/extensionsThe parameter R indicates a recursive operation of the directory, and Kext looks like a file under the graphical interface, which is actually a folder.Back up all files in the drive directory to desktop backupCp-r/system/library/extensions/*/user/User name/desktop/backupMove file----MVExample: Want to move Applehda.kext to the desktopmv/system/library/extensions/applehda.kext/user/User name/desktopWant to move the Applehda.kext to the backup directoryMv/system/library/e
Common Linux commands (9)-cat
The cat command is used to connect files or standard input and print. This command is often used to display the file content, connect several files, or read and display the content from the standard input. It is often used with the redirection symbol.
1. Command Format:
Cat [Option] File
2. command functions:
Cat has three main functions:
A. the entire file is displayed at one
command reads the File parameter (standard input by default), computes the line number in the input, and writes the computed line number to standard output. In the output, the NL command calculates the left line based on the flags that you specify on the command line. The input text must be written in a logical page. Each logical page has a header, a body, and a footer section (which can have an empty section). Unless you use the-P flag, the NL command re-sets the line number where each logical
There are also a few things to note: Some commands are only dangerous when there is a sudo prefix in Ubuntu. Linux for other distributions is a hazard when it is used as a root directory command.
1, Linux Fork Bomb Command
: () {: };: Known as fork Bomb, is a Linux system that rejects service attacks. : () {:: };: is a bash function. As long as it is executed, he will keep repeating until the system is frozen.
You can only reboot the system to sol
/nginx/conf/nginx.conf/nginc_conf/web2.conf,cp/usr/local/nginx/conf/nginx.conf/nginc_conf/ web3.conf Copy to your own path, and then modify the following configuration file by oneAnd so on, modify WEB2/3Then execute the web1,/usr/local/nginx/sbin/nginx–c/nginx_conf/web1.conf and find the errorVim web1.conf ModificationWEB2/3 All to modify thisNGINX_CONF has 3 Web configuration files, LB also needs to have its own profile, CP web3.conf lb.conf,Vim lb.conf first corresponds to the port and joins t
SSH login and file transfer$ssh [email protected] SSH login to the remote server host,id the user name.$sftp [email protected] Login Server Host,id as user name. After the sftp login, you can use the following command to further the operation:Get filename # download filePut filename # upload fileLS # lists all files for the current path on the hostCD # Change the current path on hostLLS # Lists all files for the current path on the local hostLCD # Change the current path on the local host$SCP lo
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.