linux basic knowledge command

192.168.25.132
root itcast

View ip command ifconfig
end current command ctrl + c
clear screen ctrl + l
list ll ls

cd enter a directory cd …/ return to the parent directory
pwd displays the current directory

mkdir creates a folder
touch creates a file

cat View
cat a.txt | grep abc View files and filter by keywords

echo> input content to the file (overwrite)
echo >> input content to the file (append)

tail -200f file name dynamic data file last 200 lines

cp copy cannot copy folders, only files can be copied
mv move to rename files if the folder is empty, then the folder will be lost
rm delete
rm -f can delete files, but can not delete the folder
rm -rf recursive deletion, violence Delete, you can delete any file and folder. When the
rm command deletes a folder, there can be no data in it-

saw / came

vi file name (open the file and enter the command line mode)
i (click the i on the keyboard once) enter the edit mode for editing
esc edit and exit the edit mode and enter the command line mode
Execute the command: shift+: start typing the command q! Force exit the
command line mode Delete a line: dd command (tap d on the keyboard twice)

shift+zz save and exit
: wq save and exit

vi search keyword
vi after opening the file, shift+: enter "/keyword" in the command line

tail -200f folder name (dynamic input tomcat log)

tail -300f logs/catalina.out |grep logController (dynamic input tomcat log filtering)

Enter tomcat/bin/
start. /
start.sh stop./shutdown.sh

ps -ef|grep tomcat(java) view tomcat process pid

ps aux view all process numbers

| grep pipeline command
kill process kill -9 pid

Unzip the
tar -xzvf compressed package name

tar -czvf test.tar.gz test //Compress the test file as test.tar.gz

tar -zxvf compressed package name

Guess you like

Origin blog.csdn.net/zhang_yuanbai/article/details/108701798