Linuxshell2 ----- Common commands linuxshell ----- 1 variable $ #, $ @, $0, $1, $2 http://www.2cto.com/os/201304/205497.html 1 ,! $ Is a special environment variable, which represents the last string of the previous command. For example, you may think like this... linux shell 2 ----- Common commands linux shell ----- 1 variable $ #, $ @, $0, $1, $2 http://www.2cto.com/os/201304/205497.html 1 ,! $ Is a special environment variable, which represents the last string of the previous command. For example, you may change $ mkdir mydir $ mv mydir yourdir $ cd yourdir to $ mkdir mydir $ mv! $ Yourdir $ cd! $2. cd-return to the last Directory. Scenario example: the current directory is/home/a. Use cd ../B to switch to/home/B. In this case, you can execute the cd-command repeatedly to switch back and forth between/home/a and/home/B. 3. du-sh * | sort-n | tail lists the top 10 files in the current directory. 4. ps aux | sort-nk + 4 | tail lists the top 10 processes with the most memory consumption. 5. netstat-tlnp lists the port numbers listened by local processes. 6. history | awk '{CMD [$2] ++; count ++;} END {for (a in CMD) print CMD [a] "" CMD [a]/count * 100 "%" a} '| grep-v ". /"| column-c3-s" "-t | sort-nr | nl | head-n10 can output the ten most commonly used commands, in this way, you can even find out what type of programmer you are. 7. when you are about to end the login dialog process, you can type the logout command, exit command, or file terminator (EOF) (press ctrl + d ), end logon 8, Ctrl + a switch to the command line start Ctrl + l clear the screen content, the effect is equivalent to clear Ctrl + y paste the character Ctrl + e just deleted switch to the end of the command line Ctrl + u clear cut the content before the cursor Ctrl + k cut clear the content after the cursor
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