Linux common instruction set project finishing-from personal project finishing

Linux common instruction set project finishing-from personal project finishing

Linux common instruction set project finishing-from personal project finishing

---------------------------- 1 Linux directives ------------------ --------------------

View the current path pwd
running file: ./file name run or ./file name
Create script: touch hello.sh
execute script sh hello.sh or ./hello.sh
Find the file find -name test.file
enter the process ls -al / proc / XXX XXX is the process name
Find the port ps -ef | grep XXX
View the current path: pwd
View the log: tail -f xxx xxx is the file name
Find the current directory file find -name file name
Global find find / -name file name
View a Processes ps -ef | grep elastic
find content in a file grep “search content” filename For example: grep ORA alert_gsp.log
view jdk installation path echo $ JAVA_HOME whereis java which java (java execution path) echo $ PATH
view jsk process The status of jstat -gcutil 34113 3000 (jstat: directory 34113: process number 3000: 3 seconds ")
View redis cluster information status ps -ef | grep redis
view linux memory disk information df -h
view memory in the current directory (without subdirectories ) du -ah --max-depth = 1
SecureCRT upload and download files yum installation. Run the command yum install lrzsz
upload: rz command
Download: sz command
Log printing sort jmap -histo: live 18418 | sort -n -r -k 3 | head -10
sort sorting- > -n: use pure numbers for sorting -r: Reverse sorting -k: sort by field (
head ) : number of prints
System limit on user resources ulimit -a
find the number of threads of the current process pstree -p PID | wc -l-> PID: process number
find the current system the number of threads used pstree -p | wc -l
displays a list of files by displaying less + G -RNM filename ctrl + z to exit
? up Search string: string query
search string down: / query string
extracting tar File tar zxvf File name
View the content carrying the "60316" keyword and display 20 lines cat KKIOT.log | grep 60316 -B 20 | less
View the service status service mysql status View the status of mysql
View the firewall status service iptables status
Create user useradd User name, passwd user name (then changed to a new password)
View the current login user name whoami
View the logged-in user who
View all user group cat / etc / group files
View redis cluster information-> find the redis installation path (/ usr / local / server / redis / bin)
-> enter the redis bin directory and
execute-> redis-cli -h 172.20 .4.999 -p 6379 -n -password (password is the password, no password: redis-cli -h 172.20.4.999 -p 6379)
-> execute the command cluster slots
less command detailed less file name
ping network port telnet ip port
install aget command APT-GET install vim APT-GET install less
APT-GET Update
switch administrator privileges sudo sudo su - root
count the number of times a keyword appears in the file grep -o "issued a notice under the circle of people began to contro, inDTO" kkmessage5_info.log | wc - l

—Docker command 1 basic command
in the / var / lib / docker directory of the Docker host View version docker -v View docker status systemctl status docker View docker summary information docker info List all images docker images Search image docker search Image name pull image docker pull mirror name mirror name example: zookeeper delete image docker rmi $ IMAGE_ID delete specified image docker rmi delete all images view container docker ps view running containers docker ps -a view all containers docker ps -l view running containers docker ps -f status = exited View stopped containers








docker images -q



—Java
View the current collector java -XX: + PrintCommandLineFlags -version

Published 10 original articles · Likes0 · Visits13

Guess you like

Origin blog.csdn.net/weixin_41141000/article/details/105495133