Find which files in the directory contain a certain string
Find. | xargs grep-ri "IBM"
Check whether all files in the directory contain a certain string and print only the file name.
Find. | xargs grep-ri "p3_40_16_16/graduation"-l
Grep-LR 'Graduation potato go to-Cool trousers '/scmgt/logs /*
Check whether a specified file contains a character string. [| less pipe, click "enter" to view the string slowly]
Cat pdtsrv_error.log | grep 12345676543221 | less
Find the directory where the file is located
Find/-name productserver. Jar
Find/-name 2z80sf31d77628523251.mp3
View the number of rows
Cat counttimelogger. log | WC-l
View files and update them in time
Tail-f xx. Log
The locally uploaded sh script must be encoded to run on the server. Otherwise, it cannot run.
Vi xx. Sh
Set fileformat = Unix
View Processes
PS-El | grep Java
PS-Ef | grep Java
Kill-9 xxx
Kill-9 'ps-Ef | grep "chtftpmusicfileserviceimpl" | grep-V grep | awk '{print $2 }''
Kill-9 'ps-Ef | grep "ftpwalkmanmain. Sh" | grep-V grep | awk '{print $2 }''
Kill-9 'ps-Ef | grep "ftpcoloringmain. Sh" | grep-V grep | awk '{print $2 }''
Compression GZ
Unzip sucai_0407.dmp.gz
Compression:
Gzip sucai_0407.dmp.gz
Upload (files are uploaded between two servers, which is extremely fast)
SCP sucai_0407.dmp 10.25.173.31:/scmgt/
Execute scheduled tasks
Crontab-e