{"id":3718,"date":"2019-06-29T22:43:43","date_gmt":"2019-06-29T14:43:43","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=3718"},"modified":"2019-06-29T22:43:44","modified_gmt":"2019-06-29T14:43:44","slug":"swatch","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/swatch","title":{"rendered":"swatch\u547d\u4ee4 – \u7528\u4e8e\u7cfb\u7edf\u76d1\u63a7"},"content":{"rendered":"\n
swatch\u53ef\u7528\u6765\u76d1\u63a7\u7cfb\u7edf\u8bb0\u5f55\u6587\u4ef6\uff0c\u5e76\u5728\u53d1\u73b0\u7279\u5b9a\u7684\u4e8b\u4ef6\u65f6\uff0c\u6267\u884c\u6307\u5b9a\u7684\u52a8\u4f5c\u3002\u4f7f\u7528\u4e4b\u524d\u9700\u8981\u9884\u8bbeswatch\u7684\u914d\u7f6e\u6587\u4ef6”.swatchrc”\u3002\u53ef\u4ee5\u6839\u636e\u9700\u6c42\u4fee\u6539”.swatchrc”\u6587\u4ef6\u6765\u76d1\u63a7\u4e8b\u4ef6\u53ca\u6267\u884c\u7684\u52a8\u4f5c\u3002<\/p>\n\n\n\n
\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>swatch [\u53c2\u6570]<\/p>\n\n\n\n \u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n \u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n \u5f00\u542f\u7cfb\u7edf\u76d1\u63a7\uff1a<\/p>\n\n\n\n \u9009\u5b9a”abc.conf”\u914d\u7f6e\u6587\u4ef6(\u8bf7\u6ce8\u610f\u6587\u4ef6\u8def\u5f84)\uff0c\u6267\u884c\u5c06\u65e5\u5fd7\u5199\u5165\u5230”\/var\/log\/secure.1″\uff1a<\/p>\n\n\n\n swatch\u53ef\u7528\u6765\u76d1\u63a7\u7cfb\u7edf\u8bb0\u5f55\u6587\u4ef6\uff0c\u5e76\u5728\u53d1\u73b0\u7279\u5b9a\u7684\u4e8b\u4ef6\u65f6\uff0c\u6267\u884c\u6307\u5b9a\u7684\u52a8\u4f5c\u3002\u4f7f\u7528\u4e4b\u524d\u9700\u8981\u9884\u8bbeswatch\u7684\u914d\u7f6e\u6587 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/3718"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=3718"}],"version-history":[{"count":5,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/3718\/revisions"}],"predecessor-version":[{"id":3740,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/3718\/revisions\/3740"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=3718"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=3718"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=3718"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}-A<\/td> \u9884\u8bbe\u914d\u7f6e\u6587\u4ef6\u4e2d\uff0c\u52a8\u4f5c\u7684\u5206\u9694\u5b57\u7b26\uff0c\u9884\u8bbe\u4e3a\u9017\u53f7<\/td><\/tr> -c<\/td> \u6307\u5b9a\u914d\u7f6e\u6587\u4ef6\uff0c\u800c\u4e0d\u4f7f\u7528\u9884\u8bbe\u7684\u914d\u7f6e\u6587\u4ef6<\/td><\/tr> -f<\/td> \u68c0\u67e5\u6307\u5b9a\u7684\u8bb0\u5f55\u6587\u4ef6\uff0c\u68c0\u67e5\u5b8c\u6bd5\u540e\u4e0d\u4f1a\u7ee7\u7eed\u76d1\u63a7\u8be5\u8bb0\u5f55\u6587\u4ef6<\/td><\/tr> -I<\/td> \u6307\u5b9a\u8f93\u5165\u8bb0\u5f55\u7684\u5206\u9694\u5b57\u7b26\uff0c\u9884\u8bbe\u4e3a\u6362\u884c\u5b57\u7b26<\/td><\/tr> -P<\/td> \u6307\u5b9a\u914d\u7f6e\u6587\u4ef6\u4e2d\uff0c\u4e8b\u4ef6\u7684\u5206\u9694\u5b57\u7b26\uff0c\u9884\u8bbe\u4e3a\u9017\u53f7<\/td><\/tr> -r<\/td> \u5728\u6307\u5b9a\u7684\u65f6\u95f4\u91cd\u65b0\u542f\u52a8<\/td><\/tr> -t<\/td> \u68c0\u67e5\u6307\u5b9a\u7684\u8bb0\u5f55\u6587\u4ef6\uff0c\u5e76\u4e14\u4f1a\u76d1\u63a7\u52a0\u5165\u8bb0\u5f55\u6587\u4ef6\u4e2d\u7684\u540e\u7ee7\u8bb0\u5f55<\/td><\/tr><\/tbody><\/table>\n\n\n\n [root@linuxcool ~]# swatch<\/pre>\n\n\n\n
[root@linuxcool ~]# swatch -c \/root\/abc.conf --examine=\/var\/log\/secure.1<\/pre>\n","protected":false},"excerpt":{"rendered":"