歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> 關於Linux >> Linux命令速查

Linux命令速查

日期:2017/3/2 9:38:52   编辑:關於Linux

顯示消耗內存最多的10個進程
ps aux | sort -nk +4 | tail
實時查看目錄下最新改動過的文件
watch -d -n 1 'df; ls -FlAt /path'
找出最常用的10條命令
history | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | sort -rn | head
vim 保存文件時發現需要 root 權限
:w !sudo tee%
計時器
time read
新建文件
>file.txt
快速備份文件
cp filename{,.bak}
定時執行任務,一次性任務用 at,重復性任務用 cron *
echo cmd | at midnight //tomorrow, next week …
*
查看端口占用

netstat -tulnp
快速開啟一個 smtp 服務
python -m smtpd -n -c DebuggingServer localhost:1025
共享當前文件夾 http://127.0.0.1:8000
python -m SimpleHTTPServer
使用 wget 遞歸下載整個網站
wget —random-wait -r -p -e robots=off -U Mozilla www.example.com

Copyright © Linux教程網 All Rights Reserved