{"id":7684,"date":"2020-05-23T18:43:05","date_gmt":"2020-05-23T10:43:05","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=7684"},"modified":"2020-05-23T18:43:05","modified_gmt":"2020-05-23T10:43:05","slug":"compgen","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/compgen","title":{"rendered":"compgen\u547d\u4ee4 – \u5217\u51fa\u6240\u6709Linux\u547d\u4ee4"},"content":{"rendered":"\n

compgen\u4e00\u4e2a\u5f88\u68d2\u7684\u547d\u4ee4\u5217\u51fa\u6240\u6709Linux\u547d\u4ee4\uff0ccompgen\u662fbash\u5185\u7f6e\u547d\u4ee4\uff0c\u5b83\u5c06\u663e\u793a\u6240\u6709\u53ef\u7528\u7684\u547d\u4ee4\uff0c\u522b\u540d\u548c\u51fd\u6570\u3002<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>compgen [\u53c2\u6570]<\/p>\n\n\n\n

\u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n

-c<\/td>\u5217\u51fa\u6240\u6709\u53ef\u7528\u7684\u547d\u4ee4<\/td><\/tr>
-a<\/td>\u5217\u51fa\u53ef\u7528\u7684\u6240\u6709bash shell\u522b\u540d<\/td><\/tr>
-b<\/td>\u663e\u793a\u6240\u6709bash\u5185\u7f6e\u63d2\u4ef6<\/td><\/tr>
-k<\/td>\u663e\u793a\u6240\u6709bash\u5173\u952e\u5b57<\/td><\/tr>
-A<\/td>\u663e\u793a\u6240\u6709bash\u51fd\u6570<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

\u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n

\u5217\u51fa\u6240\u6709\u53ef\u7528\u7684\u547d\u4ee4\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# compgen -c<\/pre>\n\n\n\n

\u5217\u51fa\u53ef\u7528\u7684\u6240\u6709bash shell\u522b\u540d\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# compgen -a<\/pre>\n\n\n\n

\u663e\u793a\u6240\u6709bash\u5185\u7f6e\u63d2\u4ef6\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# compgen -b<\/pre>\n\n\n\n

\u663e\u793a\u6240\u6709bash\u5173\u952e\u5b57\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# compgen -k<\/pre>\n\n\n\n

\u663e\u793a\u6240\u6709bash\u51fd\u6570\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# compgen -A<\/pre>\n","protected":false},"excerpt":{"rendered":"

compgen\u4e00\u4e2a\u5f88\u68d2\u7684\u547d\u4ee4\u5217\u51fa\u6240\u6709Linux\u547d\u4ee4\uff0ccompgen\u662fbash\u5185\u7f6e\u547d\u4ee4\uff0c\u5b83\u5c06\u663e\u793a\u6240\u6709\u53ef\u7528\u7684\u547d\u4ee4\uff0c […]<\/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\/7684"}],"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=7684"}],"version-history":[{"count":1,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/7684\/revisions"}],"predecessor-version":[{"id":7685,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/7684\/revisions\/7685"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=7684"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=7684"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=7684"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}