{"id":827,"date":"2013-05-16T08:00:02","date_gmt":"2013-05-16T08:00:02","guid":{"rendered":"https:\/\/cowman-chiang.no-ip.org\/wordpress\/?p=827"},"modified":"2019-06-20T10:26:12","modified_gmt":"2019-06-20T02:26:12","slug":"%e5%ae%9a%e6%99%82%e9%96%93%e7%9c%8b%e7%b5%90%e6%9e%9c-watch","status":"publish","type":"post","link":"https:\/\/cowmanchiang.me\/wp\/?p=827","title":{"rendered":"\u5b9a\u6642\u9593\u770b\u7d50\u679c &#8212; Watch"},"content":{"rendered":"<pre lang=\"bash\">\nWATCH(1)                      Linux User\u2019s Manual                     WATCH(1)\n\nNAME\n       watch - execute a program periodically, showing output fullscreen\n\nSYNOPSIS\n       watch   [-dhvt]   [-n   <seconds>]   [--differences[=cumulative]]   [--help]  [--interval=<seconds>]\n       [--no-title] [--version] <command>\n\nDESCRIPTION\n       watch runs command repeatedly, displaying its output (the first screenfull).   This  allows  you  to\n       watch  the  program output change over time.  By default, the program is run every 2 seconds; use -n\n       or --interval to specify a different interval.\n\n       The -d or --differences flag will highlight the differences between successive updates.  The --cumu-\n       lative  option  makes highlighting \"sticky\", presenting a running display of all positions that have\n       ever changed.  The -t or --no-title option turns off the header showing the interval,  command,  and\n       current time at the top of the display, as well as the following blank line.\n\n       watch will run until interrupted.\n\nNOTE\n       Note  that command is given to \"sh -c\" which means that you may need to use extra quoting to get the\n       desired effect.\n\n       Note that POSIX option processing is used (i.e., option processing stops  at  the  first  non-option\n       argument).  This means that flags after command don\u2019t get interpreted by watch itself.\n\nEXAMPLES\n       To watch for mail, you might do\n\n              watch -n 60 from\n\n       To watch the contents of a directory change, you could use\n\n              watch -d ls -l\n\n       If you\u2019re only interested in files owned by user joe, you might use\n\n              watch -d \u2019ls -l | fgrep joe\u2019\n\n       To see the effects of quoting, try these out\n\n              watch echo $$\n\n              watch echo \u2019$$\u2019\n\n              watch echo \"\u2019\"\u2019$$\u2019\"\u2019\"\n\n       You can watch for your administrator to install the latest kernel with\n\n              watch uname -r\n\n       (Just kidding.)\n\nBUGS\n       Upon  terminal  resize,  the screen will not be correctly repainted until the next scheduled update.\n       All --differences highlighting is lost on that update as well.\n\n       Non-printing characters are stripped from program output.  Use \"cat  -v\"  as  part  of  the  command\n       pipeline if you want to see them.\n\nAUTHORS\n       The  original  watch was written by Tony Rems <rembo@unisoft.com> in 1991, with mods and corrections\n       by Francois Pinard.  It was reworked and new features added by Mike Coleman <mkc@acm.org> in 1999.\n<\/pre>\n<p>\u4ee5\u4e0b\u662f\u61c9\u7528\u7bc4\u4f8b<\/p>\n<pre lang=\"bash\">watch --interval=5 du -h \/mnt\/hgfs\/mail2000\/splunk84.tar.gz<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>WATCH(1) Linux User\u2019s Manual WATCH(1) NAME watch &#8211; execute a program periodically, showing output fullscreen SYNOPSIS watch [-dhvt] [-n ] [&#8211;differences[=cumulative]] [&#8211;help] [&#8211;interval=] [&#8211;no-title] [&#8211;version] DESCRIPTION watch runs command repeatedly, displaying its output (the first screenfull). This allows you to &hellip; <a href=\"https:\/\/cowmanchiang.me\/wp\/?p=827\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[58],"tags":[],"class_list":["post-827","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/posts\/827","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=827"}],"version-history":[{"count":1,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/posts\/827\/revisions"}],"predecessor-version":[{"id":2089,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/posts\/827\/revisions\/2089"}],"wp:attachment":[{"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=827"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=827"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=827"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}