DevOps 日常高频命令。打印出来放桌上,用到熟练为止。
ls -lacd /pathpwdcp src dstmv src dstrm -rf dirmkdir -p a/b/ctouch fileln -s target linkcat fileless filehead -N filetail -N filetail -f filewc -l filefile filegrep pattern filegrep -r pattern dir/grep -i pattern filegrep -v pattern filegrep -c pattern filefind dir -name "*.log"find dir -mtime -7find dir -size +100Mfind dir -exec cmd {} \;cmd1 | cmd2cmd > filecmd >> filecmd < filecmd 2>/dev/nullcmd &>/dev/nullps auxps aux | grep nametop / htopkill PIDkill -9 PIDpkill -f patternnohup cmd &Ctrl+Z → bgdf -hdu -sh dir/du -h --max-depth=1free -hcurl URLcurl -I URLcurl -X POST -d '{}' URLss -tlnpping -c N hostdig domainnc -zv host portscp file user@host:/pathchmod +x scriptchmod 755 filechmod 644 filechown user:group filesudo cmdsystemctl status svcsystemctl start/stop svcsystemctl restart svcsystemctl enable svcjournalctl -u svc -fman cmdhistory!!Ctrl+RCtrl+CCtrl+Dalias ll='ls -la'tee filejq '.' file.json