经常用到一些命令,还总是忘掉的,就简单列在这里。总是现查也挺麻烦的。Linux:top mem consumer: sudo ps -aux | sort -k4nr | head -5 or top, then press Mconnection number: netstat -an | grep ESTABLISHED | wc –lprocess number: ps -ef | wc -lthreads of a process: ps uH p <pid> | wc -l.tar: tar -xvf archive.tar and tar -cvf archive.tar file1.tar.gz: tar -cvfz archive.tar.gz dir1 and tar -xvfz archive.tar.gz.zip: zip -r archive.zip ./folder and unzip archive.zip -d ./empty a file: sudo cat /dev/nullcapture all the output and run in the background: bb > /tmp/a.txt 2>&1 &list the latest changed files: ls -lht |
...
继续阅读
(54)