watch 能間歇地執行程式,并將輸出結果以全屏的方式顯示,默認時2s執行一次;
watch -n 5 ping -c 1 www.baidu.com # 進行回圈5秒鐘,發送一次ping包;
使用范例:
To watch for mail, you might do watch -n 60 from To watch the contents of a directory change, you could use watch -d ls -l If you're only interested in files owned by user joe, you might use watch -d 'ls -l | fgrep joe' To see the effects of quoting, try these out watch echo $$ watch echo '$$' watch echo "'"'$$'"'"
更多檔案,請直接查找man手冊;非常好用的工具,我今天才知道,,
保持更新,更多內容請關注 cnblogs.com/xuyaowen;
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/152893.html
標籤:Linux
