Developer on Alibaba Coud: Build your first app with APIs, SDKs, and tutorials on the Alibaba Cloud. Read more ＞
Liunx command work summary (1) all commands are used in actual operations and recorded. I want to share it with you. Reasons for learning from www.2cto.com: 1. commands can improve the efficiency of liunx system operations. 2. whether or not you are using linux, I believe that...
Liunx command work summary (1) all commands are used in actual operations and recorded. I want to share it with you. Reasons for learning from www.2cto.com: 1. commands can improve the efficiency of liunx system operations. 2. whether you are using the linux system or not, I believe that we will only be closer to it and need it in the future. Because the current company cannot take notes from the company out of the company, only part of the notes can be shared and recorded in the blog. 1. I often encounter garbled text files in actual situations. I should see garbled text when I open a text file. Run setenv LANG. run zh_CN.GBK2 to check the linux version of lsb_release-a3, enter the directory, and output the directory. sometimes you need to check the files under multiple directories. Two commands are very useful: cd-# return the last Directory cd ~ # Go to the user's directory 4 and check whether the user's shell mode is csh or bsh, which affects the compilation and running of shell scripts: echo $ shell5, view the cpu usage of the process toptop-d 3 # refresh every 3 seconds 6, give the file the permission chmod + x License executed by the current user. sh7: check the logon status of the linked operation server: who # display all connections to the server who am I # display the user information during logon whoami # display the current user information 8, use wildcards to find a file. /-name "*. class "# search for all class files 9 in the current directory and find a string in all files. /log/-name "*" | xargs grep "ERROR" # check. /log/add row 10 with the "ERROR" string in all files to query processes with a string (process information, including process numbers) ps-ef | grep tomcat11: kill the process kill-9 1234 according to the process number # kill the 1234 process 12, determine whether the user has id-u tomcat # determine whether the tomcat user exists 13, find out who is using this file lsof. /tomcat/14, force delete file rm-rf file15, copy file cp-rf/home/apache-tomcat-6.0.35/bin/startup. sh/home/cp-rf/home/apache-tomcat-6.0.35/bin /. /home/# copy all files in bin
This article is an English version of an article which is originally in the Chinese language on aliyun.com and is provided for information purposes only. This website makes no representation or warranty of any kind, either expressed or implied, as to the accuracy, completeness ownership or
reliability of the article or any translations thereof. If you have any concerns or complaints relating to the article, please send an email, providing a detailed description of the concern or
complaint, to email@example.com. A staff member will contact you within 5 working days. Once verified, infringing content will be removed immediately.
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:
and provide relevant evidence. A staff member will contact you within 5 working days.