{"id":1661,"date":"2017-01-15T10:06:23","date_gmt":"2017-01-15T02:06:23","guid":{"rendered":"http:\/\/cn.hostease.com\/xueyuan\/?p=1661"},"modified":"2017-01-15T10:06:23","modified_gmt":"2017-01-15T02:06:23","slug":"30%e4%b8%aa%e5%ae%9e%e7%94%a8%e7%9a%84linux-find%e5%91%bd%e4%bb%a4%e7%a4%ba%e4%be%8b","status":"publish","type":"post","link":"https:\/\/cn.hostease.com\/xueyuan\/jishu\/30%e4%b8%aa%e5%ae%9e%e7%94%a8%e7%9a%84linux-find%e5%91%bd%e4%bb%a4%e7%a4%ba%e4%be%8b\/","title":{"rendered":"30\u4e2a\u5b9e\u7528\u7684Linux find\u547d\u4ee4\u793a\u4f8b"},"content":{"rendered":"<div class=\"post-bd fz16\">\n<p>\u9664\u4e86\u5728\u4e00\u4e2a\u76ee\u5f55\u7ed3\u6784\u4e0b\u67e5\u627e\u6587\u4ef6\u8fd9\u79cd\u57fa\u672c\u7684\u64cd\u4f5c\uff0c\u4f60\u8fd8\u53ef\u4ee5\u7528<span class=\"wp_keywordlink\"><a title=\"find\u547d\u4ee4\" href=\"https:\/\/man.linuxde.net\/find\" target=\"_blank\">find<\/a><\/span>\u547d\u4ee4\u5b9e\u73b0\u4e00\u4e9b\u5b9e\u7528\u7684\u64cd\u4f5c\uff0c\u4f7f\u4f60\u7684\u547d\u4ee4\u884c\u4e4b\u65c5\u66f4\u52a0\u7b80\u6613\u3002\u672c\u6587\u5c06\u4ecb\u7ecd15\u79cd\u65e0\u8bba\u662f\u4e8e\u65b0\u624b\u8fd8\u662f\u8001\u9e1f\u90fd\u975e\u5e38\u6709\u7528\u7684<span class=\"wp_keywordlink\"><a title=\"Linux\" href=\"https:\/\/www.linuxde.net\" target=\"_blank\">Linux<\/a><\/span> find\u547d\u4ee4\u3002<\/p>\n<p>\u9996\u5148\uff0c\u5728\u4f60\u7684home\u76ee\u5f55\u4e0b\u9762\u521b\u5efa\u4e0b\u9762\u7684\u7a7a\u6587\u4ef6\uff0c\u6765\u6d4b\u8bd5\u4e0b\u9762\u7684find\u547d\u4ee4\u793a\u4f8b\u3002<\/p>\n<pre># vim create_sample_files.sh\r\n<span class=\"wp_keywordlink\"><a title=\"touch\u547d\u4ee4\" href=\"https:\/\/man.linuxde.net\/touch\" target=\"_blank\">touch<\/a><\/span> MybashProgram.sh\r\ntouch mycprogram.c\r\ntouch MyCProgram.c\r\ntouch Program.c\r\n<span class=\"wp_keywordlink\"><a title=\"mkdir\u547d\u4ee4\" href=\"https:\/\/man.linuxde.net\/mkdir\" target=\"_blank\">mkdir<\/a><\/span> backup\r\n<span class=\"wp_keywordlink\"><a title=\"cd\u547d\u4ee4\" href=\"https:\/\/man.linuxde.net\/cd\" target=\"_blank\">cd<\/a><\/span> backup\r\ntouch MybashProgram.sh\r\ntouch mycprogram.c\r\ntouch MyCProgram.c\r\ntouch Program.c\r\n# <span class=\"wp_keywordlink\"><a title=\"chmod\u547d\u4ee4\" href=\"https:\/\/man.linuxde.net\/chmod\" target=\"_blank\">chmod<\/a><\/span> +x create_sample_files.sh\r\n# .\/create_sample_files.sh\r\n# <span class=\"wp_keywordlink\"><a title=\"ls\u547d\u4ee4\" href=\"https:\/\/man.linuxde.net\/ls\" target=\"_blank\">ls<\/a><\/span> -R\r\n.:\r\nbackup                  MybashProgram.sh  MyCProgram.c\r\ncreate_sample_files.sh  mycprogram.c      Program.c\r\n.\/backup:\r\nMybashProgram.sh  mycprogram.c  MyCProgram.c  Program.c<\/pre>\n<h3>1. \u7528\u6587\u4ef6\u540d\u67e5\u627e\u6587\u4ef6<\/h3>\n<p>\u8fd9\u662ffind\u547d\u4ee4\u7684\u4e00\u4e2a\u57fa\u672c\u7528\u6cd5\u3002\u4e0b\u9762\u7684\u4f8b\u5b50\u5c55\u793a\u4e86\u7528MyCProgram.c\u4f5c\u4e3a\u67e5\u627e\u540d\u5728\u5f53\u524d\u76ee\u5f55\u53ca\u5176\u5b50\u76ee\u5f55\u4e2d\u67e5\u627e\u6587\u4ef6\u7684\u65b9\u6cd5\u3002<\/p>\n<pre># find -name \"MyCProgram.c\"\r\n.\/backup\/MyCProgram.c\r\n.\/MyCProgram.c<\/pre>\n<h3>2.\u7528\u6587\u4ef6\u540d\u67e5\u627e\u6587\u4ef6\uff0c\u5ffd\u7565\u5927\u5c0f\u5199<\/h3>\n<p>\u8fd9\u662ffind\u547d\u4ee4\u7684\u4e00\u4e2a\u57fa\u672c\u7528\u6cd5\u3002\u4e0b\u9762\u7684\u4f8b\u5b50\u5c55\u793a\u4e86\u7528MyCProgram.c\u4f5c\u4e3a\u67e5\u627e\u540d\u5728\u5f53\u524d\u76ee\u5f55\u53ca\u5176\u5b50\u76ee\u5f55\u4e2d\u67e5\u627e\u6587\u4ef6\u7684\u65b9\u6cd5\uff0c\u5ffd\u7565\u4e86\u5927\u5c0f\u5199\u3002<\/p>\n<pre># find -iname \"MyCProgram.c\"\r\n.\/mycprogram.c\r\n.\/backup\/mycprogram.c\r\n.\/backup\/MyCProgram.c\r\n.\/MyCProgram.c<\/pre>\n<h3>3. \u4f7f\u7528mindepth\u548cmaxdepth\u9650\u5b9a\u641c\u7d22\u6307\u5b9a\u76ee\u5f55\u7684\u6df1\u5ea6<\/h3>\n<p>\u5728root\u76ee\u5f55\u53ca\u5176\u5b50\u76ee\u5f55\u4e0b\u67e5\u627e<span class=\"wp_keywordlink\"><a title=\"passwd\u547d\u4ee4\" href=\"https:\/\/man.linuxde.net\/passwd\" target=\"_blank\">passwd<\/a><\/span>\u6587\u4ef6\u3002<\/p>\n<pre># find \/ -name passwd\r\n.\/usr\/share\/doc\/nss_ldap-253\/pam.d\/passwd\r\n.\/usr\/bin\/passwd\r\n.\/etc\/pam.d\/passwd\r\n.\/etc\/passwd<\/pre>\n<p>\u5728root\u76ee\u5f55\u53ca\u51761\u5c42\u6df1\u7684\u5b50\u76ee\u5f55\u4e2d\u67e5\u627epasswd. (\u4f8b\u5982root \u2014 level 1, and one sub-directory \u2014 level 2)<\/p>\n<pre># find -maxdepth 2 -name passwd\r\n.\/etc\/passwd<\/pre>\n<p>\u5728root\u76ee\u5f55\u4e0b\u53ca\u5176\u6700\u5927\u4e24\u5c42\u6df1\u5ea6\u7684\u5b50\u76ee\u5f55\u4e2d\u67e5\u627epasswd\u6587\u4ef6. (\u4f8b\u5982 root \u2014 level 1, and two sub-directories \u2014 level 2 and 3 )<\/p>\n<pre># find \/ -maxdepth 3 -name passwd\r\n.\/usr\/bin\/passwd\r\n.\/etc\/pam.d\/passwd\r\n.\/etc\/passwd<\/pre>\n<p>\u5728\u7b2c\u4e8c\u5c42\u5b50\u76ee\u5f55\u548c\u7b2c\u56db\u5c42\u5b50\u76ee\u5f55\u4e4b\u95f4\u67e5\u627epasswd\u6587\u4ef6\u3002<\/p>\n<pre># find -mindepth 3 -maxdepth 5 -name passwd\r\n.\/usr\/bin\/passwd\r\n.\/etc\/pam.d\/passwd<\/pre>\n<h3>4. \u5728find\u547d\u4ee4\u67e5\u627e\u5230\u7684\u6587\u4ef6\u4e0a\u6267\u884c\u547d\u4ee4<\/h3>\n<p>\u4e0b\u9762\u7684\u4f8b\u5b50\u5c55\u793a\u4e86find\u547d\u4ee4\u6765\u8ba1\u7b97\u6240\u6709\u4e0d\u533a\u5206\u5927\u5c0f\u5199\u7684\u6587\u4ef6\u540d\u4e3a\u201cMyCProgram.c\u201d\u7684\u6587\u4ef6\u7684MD5\u9a8c\u8bc1\u548c\u3002{}\u5c06\u4f1a\u88ab\u5f53\u524d\u6587\u4ef6\u540d\u53d6\u4ee3\u3002<\/p>\n<pre>find -iname \"MyCProgram.c\" -<span class=\"wp_keywordlink\"><a title=\"exec\u547d\u4ee4\" href=\"https:\/\/man.linuxde.net\/exec\" target=\"_blank\">exec<\/a><\/span> <span class=\"wp_keywordlink\"><a title=\"md5sum\u547d\u4ee4\" href=\"https:\/\/man.linuxde.net\/md5sum\" target=\"_blank\">md5sum<\/a><\/span> {} \\;\r\nd41d8cd98f00b204e9800998ecf8427e  .\/mycprogram.c\r\nd41d8cd98f00b204e9800998ecf8427e  .\/backup\/mycprogram.c\r\nd41d8cd98f00b204e9800998ecf8427e  .\/backup\/MyCProgram.c\r\nd41d8cd98f00b204e9800998ecf8427e  .\/MyCProgram.c<\/pre>\n<h3>5. \u76f8\u53cd\u5339\u914d<\/h3>\n<p>\u663e\u793a\u6240\u6709\u7684\u540d\u5b57\u4e0d\u662fMyCProgram.c\u7684\u6587\u4ef6\u6216\u8005\u76ee\u5f55\u3002\u7531\u4e8emaxdepth\u662f1\uff0c\u6240\u4ee5\u53ea\u4f1a\u663e\u793a\u5f53\u524d\u76ee\u5f55\u4e0b\u7684\u6587\u4ef6\u548c\u76ee\u5f55\u3002<\/p>\n<pre>find -maxdepth 1 -not -iname \"MyCProgram.c\"\r\n.\r\n.\/MybashProgram.sh\r\n.\/create_sample_files.sh\r\n.\/backup\r\n.\/Program.c<\/pre>\n<h3>6. \u4f7f\u7528inode\u7f16\u53f7\u67e5\u627e\u6587\u4ef6<\/h3>\n<p>\u4efb\u4f55\u4e00\u4e2a\u6587\u4ef6\u90fd\u6709\u4e00\u4e2a\u72ec\u4e00\u65e0\u4e8c\u7684inode\u7f16\u53f7\uff0c\u501f\u6b64\u6211\u4eec\u53ef\u4ee5\u533a\u5206\u6587\u4ef6\u3002\u521b\u5efa\u4e24\u4e2a\u540d\u5b57\u76f8\u4f3c\u7684\u6587\u4ef6\uff0c\u4f8b\u5982\u4e00\u4e2a\u6709\u7a7a\u683c\u7ed3\u5c3e\uff0c\u4e00\u4e2a\u6ca1\u6709\u3002<\/p>\n<pre>touch \"<span class=\"wp_keywordlink\"><a title=\"test\u547d\u4ee4\" href=\"https:\/\/man.linuxde.net\/test\" target=\"_blank\">test<\/a><\/span>-<span class=\"wp_keywordlink\"><a title=\"file\u547d\u4ee4\" href=\"https:\/\/man.linuxde.net\/file\" target=\"_blank\">file<\/a><\/span>-name\"\r\n# touch \"test-file-name \"\r\n[Note: There is a space <span class=\"wp_keywordlink\"><a title=\"at\u547d\u4ee4\" href=\"https:\/\/man.linuxde.net\/at\" target=\"_blank\">at<\/a><\/span> the end]\r\n# ls -1 test*\r\ntest-file-name\r\ntest-file-name<\/pre>\n<p>\u4ecels\u7684\u8f93\u51fa\u4e0d\u80fd\u533a\u5206\u54ea\u4e2a\u6587\u4ef6\u6709\u7a7a\u683c\u7ed3\u5c3e\u3002\u4f7f\u7528\u9009\u9879-i\uff0c\u53ef\u4ee5\u770b\u5230\u6587\u4ef6\u7684inode\u7f16\u53f7\uff0c\u501f\u6b64\u53ef\u4ee5\u533a\u5206\u8fd9\u4e24\u4e2a\u6587\u4ef6\u3002<\/p>\n<pre>ls -i1 test*\r\n16187429 test-file-name\r\n16187430 test-file-name<\/pre>\n<p>\u4f60\u53ef\u4ee5\u5982\u4e0b\u9762\u6240\u793a\u5728find\u547d\u4ee4\u4e2d\u6307\u5b9ainode\u7f16\u53f7\u3002\u5728\u6b64\uff0cfind\u547d\u4ee4\u7528inode\u7f16\u53f7\u91cd\u547d\u540d\u4e86\u4e00\u4e2a\u6587\u4ef6\u3002<\/p>\n<pre>find -inum 16187430 -exec <span class=\"wp_keywordlink\"><a title=\"mv\u547d\u4ee4\" href=\"https:\/\/man.linuxde.net\/mv\" target=\"_blank\">mv<\/a><\/span> {} new-test-file-name \\;\r\n \r\n # ls -i1 *test*\r\n16187430 new-test-file-name\r\n16187429 test-file-name<\/pre>\n<p>\u4f60\u53ef\u4ee5\u5728\u4f60\u60f3\u5bf9\u90a3\u4e9b\u50cf\u4e0a\u9762\u4e00\u6837\u7684\u7cdf\u7cd5\u547d\u540d\u7684\u6587\u4ef6\u505a\u67d0\u4e9b\u64cd\u4f5c\u65f6\u4f7f\u7528\u8fd9\u4e00\u6280\u672f\u3002\u4f8b\u5982\uff0c\u540d\u4e3afile?.txt\u7684\u6587\u4ef6\u540d\u5b57\u4e2d\u6709\u4e00\u4e2a\u7279\u6b8a\u5b57\u7b26\u3002\u82e5\u4f60\u60f3\u6267\u884c\u201c<span class=\"wp_keywordlink\"><a title=\"rm\u547d\u4ee4\" href=\"https:\/\/man.linuxde.net\/rm\" target=\"_blank\">rm<\/a><\/span> file?.txt\u201d\uff0c\u4e0b\u9762\u6240\u793a\u7684\u6240\u6709\u4e09\u4e2a\u6587\u4ef6\u90fd\u4f1a\u88ab\u5220\u9664\u3002\u6240\u4ee5\uff0c\u91c7\u7528\u4e0b\u9762\u7684\u6b65\u9aa4\u6765\u5220\u9664\u201dfile?.txt\u201d\u6587\u4ef6\u3002<\/p>\n<pre>ls\r\nfile1.txt  file2.txt  file?.txt<\/pre>\n<p>\u627e\u5230\u6bcf\u4e00\u4e2a\u6587\u4ef6\u7684inode\u7f16\u53f7\u3002<\/p>\n<pre>ls -i1\r\n804178 file1.txt\r\n804179 file2.txt\r\n804180 file?.txt<\/pre>\n<p>\u5982\u4e0b\u6240\u793a\uff1a?\u4f7f\u7528inode\u7f16\u53f7\u6765\u5220\u9664\u90a3\u4e9b\u5177\u6709\u7279\u6b8a\u7b26\u53f7\u7684\u6587\u4ef6\u540d\u3002<\/p>\n<pre>find -inum 804180 -exec rm {} \\;\r\n# ls\r\nfile1.txt  file2.txt\r\n[Note: The file with name \"file?.txt\" is now removed]<\/pre>\n<h3>7. \u6839\u636e\u6587\u4ef6\u6743\u9650\u67e5\u627e\u6587\u4ef6<\/h3>\n<p>\u4e0b\u9762\u7684\u64cd\u4f5c\u65f6\u5408\u7406\u7684\uff1a<\/p>\n<ol>\n<li>\u627e\u5230\u5177\u6709\u6307\u5b9a\u6743\u9650\u7684\u6587\u4ef6<\/li>\n<li>\u5ffd\u7565\u5176\u4ed6\u6743\u9650\u4f4d\uff0c\u68c0\u67e5\u662f\u5426\u548c\u6307\u5b9a\u6743\u9650\u5339\u914d<\/li>\n<li>\u6839\u636e\u7ed9\u5b9a\u7684\u516b\u8fdb\u5236\/\u7b26\u53f7\u8868\u8fbe\u7684\u6743\u9650\u641c\u7d22<\/li>\n<\/ol>\n<p>\u6b64\u4f8b\u4e2d\uff0c\u5047\u8bbe\u76ee\u5f55\u5305\u542b\u4ee5\u4e0b\u6587\u4ef6\u3002\u6ce8\u610f\u8fd9\u4e9b\u6587\u4ef6\u7684\u6743\u9650\u4e0d\u540c\u3002<\/p>\n<pre>ls -l\r\ntotal 0\r\n-rwxrwxrwx 1 root root 0 2009-02-19 20:31 all_for_all\r\n-rw-r--r-- 1 root root 0 2009-02-19 20:30 everybody_read\r\n---------- 1 root root 0 2009-02-19 20:31 no_for_all\r\n-rw------- 1 root root 0 2009-02-19 20:29 ordinary_file\r\n-rw-r----- 1 root root 0 2009-02-19 20:27 others_can_also_read\r\n----r----- 1 root root 0 2009-02-19 20:27 others_can_only_read<\/pre>\n<p>\u627e\u5230\u5177\u6709\u7ec4\u8bfb\u6743\u9650\u7684\u6587\u4ef6\u3002\u4f7f\u7528\u4e0b\u9762\u7684\u547d\u4ee4\u6765\u627e\u5230\u5f53\u524d\u76ee\u5f55\u4e0b\u5bf9\u540c\u7ec4\u7528\u6237\u5177\u6709\u8bfb\u6743\u9650\u7684\u6587\u4ef6\uff0c\u5ffd\u7565\u8be5\u6587\u4ef6\u7684\u5176\u4ed6\u6743\u9650\u3002<\/p>\n<pre>find . -perm -g=r -<span class=\"wp_keywordlink\"><a title=\"type\u547d\u4ee4\" href=\"https:\/\/man.linuxde.net\/type\" target=\"_blank\">type<\/a><\/span> f -exec ls -l {} \\;\r\n-rw-r--r-- 1 root root 0 2009-02-19 20:30 .\/everybody_read\r\n-rwxrwxrwx 1 root root 0 2009-02-19 20:31 .\/all_for_all\r\n----r----- 1 root root 0 2009-02-19 20:27 .\/others_can_only_read\r\n-rw-r----- 1 root root 0 2009-02-19 20:27 .\/others_can_also_read<\/pre>\n<p>\u627e\u5230\u5bf9\u7ec4\u7528\u6237\u5177\u6709\u53ea\u8bfb\u6743\u9650\u7684\u6587\u4ef6\u3002<\/p>\n<pre>find . -perm g=r -type f -exec ls -l {} \\;\r\n----r----- 1 root root 0 2009-02-19 20:27 .\/others_can_only_read<\/pre>\n<p>\u627e\u5230\u5bf9\u7ec4\u7528\u6237\u5177\u6709\u53ea\u8bfb\u6743\u9650\u7684\u6587\u4ef6(\u4f7f\u7528\u516b\u8fdb\u5236\u6743\u9650\u5f62\u5f0f)\u3002<\/p>\n<pre>find . -perm 040 -type f -exec ls -l {} \\;\r\n----r----- 1 root root 0 2009-02-19 20:27 .\/others_can_only_read<\/pre>\n<h3>8. \u627e\u5230home\u76ee\u5f55\u53ca\u5b50\u76ee\u5f55\u4e0b\u6240\u6709\u7684\u7a7a\u6587\u4ef6(0\u5b57\u8282\u6587\u4ef6)<\/h3>\n<p>\u4e0b\u9762\u547d\u4ee4\u7684\u8f93\u51fa\u6587\u4ef6\u7edd\u5927\u591a\u6570\u90fd\u662f\u9501\u5b9a\u6587\u4ef6\u76d2\u5176\u4ed6\u7a0b\u5e8f\u521b\u5efa\u7684place hoders<\/p>\n<pre>find ~ -empty<\/pre>\n<p>\u53ea\u5217\u51fa\u4f60home\u76ee\u5f55\u91cc\u7684\u7a7a\u6587\u4ef6\u3002<\/p>\n<pre>find . -maxdepth 1 -empty<\/pre>\n<p>\u53ea\u5217\u51fa\u5f53\u5e74\u76ee\u5f55\u4e0b\u7684\u975e\u9690\u85cf\u7a7a\u6587\u4ef6\u3002<\/p>\n<pre>find . -maxdepth 1 -empty -not -name \".*\"<\/pre>\n<h3>9. \u67e5\u627e5\u4e2a\u6700\u5927\u7684\u6587\u4ef6<\/h3>\n<p>\u4e0b\u9762\u7684\u547d\u4ee4\u5217\u51fa\u5f53\u524d\u76ee\u5f55\u53ca\u5b50\u76ee\u5f55\u4e0b\u76845\u4e2a\u6700\u5927\u7684\u6587\u4ef6\u3002\u8fd9\u4f1a\u9700\u8981\u4e00\u70b9\u65f6\u95f4\uff0c\u53d6\u51b3\u4e8e\u547d\u4ee4\u9700\u8981\u5904\u7406\u7684\u6587\u4ef6\u6570\u91cf\u3002<\/p>\n<pre>find . -type f -exec ls -s {} \\; | <span class=\"wp_keywordlink\"><a title=\"sort\u547d\u4ee4\" href=\"https:\/\/man.linuxde.net\/sort\" target=\"_blank\">sort<\/a><\/span> -n -r | <span class=\"wp_keywordlink\"><a title=\"head\u547d\u4ee4\" href=\"https:\/\/man.linuxde.net\/head\" target=\"_blank\">head<\/a><\/span> -5<\/pre>\n<h3>10. \u67e5\u627e5\u4e2a\u6700\u5c0f\u7684\u6587\u4ef6<\/h3>\n<p>\u65b9\u6cd5\u540c\u67e5\u627e5\u4e2a\u6700\u5927\u7684\u6587\u4ef6\u7c7b\u4f3c\uff0c\u533a\u522b\u53ea\u662fsort\u7684\u987a\u5e8f\u662f\u964d\u5e8f\u3002<\/p>\n<pre>find . -type f -exec ls -s {} \\; | sort -n  | head -5<\/pre>\n<p>\u4e0a\u9762\u7684\u547d\u4ee4\u4e2d\uff0c\u5f88\u53ef\u80fd\u4f60\u770b\u5230\u7684\u53ea\u662f\u7a7a\u6587\u4ef6(0\u5b57\u8282\u6587\u4ef6)\u3002\u5982\u6b64\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528\u4e0b\u9762\u7684\u547d\u4ee4\u5217\u51fa\u6700\u5c0f\u7684\u6587\u4ef6\uff0c\u800c\u4e0d\u662f0\u5b57\u8282\u6587\u4ef6\u3002<\/p>\n<pre>find . -not -empty -type f -exec ls -s {} \\; | sort -n  | head -5<\/pre>\n<h3>11. \u4f7f\u7528-type\u67e5\u627e\u6307\u5b9a\u6587\u4ef6\u7c7b\u578b\u7684\u6587\u4ef6<\/h3>\n<p>\u53ea\u67e5\u627esocket\u6587\u4ef6<\/p>\n<pre>find . -type s<\/pre>\n<p>\u67e5\u627e\u6240\u6709\u7684\u76ee\u5f55<\/p>\n<pre>find . -type d<\/pre>\n<p>\u67e5\u627e\u6240\u6709\u7684\u4e00\u822c\u6587\u4ef6<\/p>\n<pre>find . -type f<\/pre>\n<p>\u67e5\u627e\u6240\u6709\u7684\u9690\u85cf\u6587\u4ef6<\/p>\n<pre>find . -type f -name \".*\"<\/pre>\n<p>\u67e5\u627e\u6240\u6709\u7684\u9690\u85cf\u76ee\u5f55<\/p>\n<pre>find -type d -name \".*\"<\/pre>\n<h3>12. \u901a\u8fc7\u548c\u5176\u4ed6\u6587\u4ef6\u6bd4\u8f83\u4fee\u6539\u65f6\u95f4\u67e5\u627e\u6587\u4ef6<\/h3>\n<p>\u663e\u793a\u5728\u6307\u5b9a\u6587\u4ef6\u4e4b\u540e\u505a\u51fa\u4fee\u6539\u7684\u6587\u4ef6\u3002\u4e0b\u9762\u7684find\u547d\u4ee4\u5c06\u663e\u793a\u6240\u6709\u7684\u5728ordinary_file\u4e4b\u540e\u521b\u5efa\u4fee\u6539\u7684\u6587\u4ef6\u3002<\/p>\n<pre>ls -lrt\r\ntotal 0\r\n-rw-r----- 1 root root 0 2009-02-19 20:27 others_can_also_read\r\n----r----- 1 root root 0 2009-02-19 20:27 others_can_only_read\r\n-rw------- 1 root root 0 2009-02-19 20:29 ordinary_file\r\n-rw-r--r-- 1 root root 0 2009-02-19 20:30 everybody_read\r\n-rwxrwxrwx 1 root root 0 2009-02-19 20:31 all_for_all\r\n---------- 1 root root 0 2009-02-19 20:31 no_for_all\r\n \r\n# find -newer ordinary_file\r\n.\r\n.\/everybody_read\r\n.\/all_for_all\r\n.\/no_for_all<\/pre>\n<h3>13. \u901a\u8fc7\u6587\u4ef6\u5927\u5c0f\u67e5\u627e\u6587\u4ef6<\/h3>\n<p>\u4f7f\u7528-size\u9009\u9879\u53ef\u4ee5\u901a\u8fc7\u6587\u4ef6\u5927\u5c0f\u67e5\u627e\u6587\u4ef6\u3002<\/p>\n<p>\u67e5\u627e\u6bd4\u6307\u5b9a\u6587\u4ef6\u5927\u7684\u6587\u4ef6<\/p>\n<pre>find ~ -size +100M<\/pre>\n<p>\u67e5\u627e\u6bd4\u6307\u5b9a\u6587\u4ef6\u5c0f\u7684\u6587\u4ef6<\/p>\n<pre>find ~ -size -100M<\/pre>\n<p>\u67e5\u627e\u7b26\u5408\u7ed9\u5b9a\u5927\u5c0f\u7684\u6587\u4ef6<\/p>\n<pre>find ~ -size 100M<\/pre>\n<p>\u6ce8\u610f: \u2013 \u6307\u6bd4\u7ed9\u5b9a\u5c3a\u5bf8\u5c0f\uff0c+ \u6307\u6bd4\u7ed9\u5b9a\u5c3a\u5bf8\u5927\u3002\u6ca1\u6709\u7b26\u53f7\u4ee3\u8868\u548c\u7ed9\u5b9a\u5c3a\u5bf8\u5b8c\u5168\u4e00\u6837\u5927\u3002<\/p>\n<h3>14. \u7ed9\u5e38\u7528find\u64cd\u4f5c\u53d6\u522b\u540d<\/h3>\n<p>\u82e5\u4f60\u53d1\u73b0\u6709\u4e9b\u4e1c\u897f\u5f88\u6709\u7528\uff0c\u4f60\u53ef\u4ee5\u7ed9\u4ed6\u53d6\u522b\u540d\u3002\u5e76\u4e14\u5728\u4efb\u4f55\u4f60\u5e0c\u671b\u7684\u5730\u65b9\u6267\u884c\u3002<\/p>\n<p>\u5e38\u7528\u7684\u5220\u9664a.out\u6587\u4ef6\u3002<\/p>\n<pre><span class=\"wp_keywordlink\"><a title=\"alias\u547d\u4ee4\" href=\"https:\/\/man.linuxde.net\/alias\" target=\"_blank\">alias<\/a><\/span> rmao=\"find . -iname a.out -exec rm {} \\;\"\r\n# rmao<\/pre>\n<p>\u5220\u9664c\u7a0b\u5e8f\u4ea7\u751f\u7684core\u6587\u4ef6\u3002<\/p>\n<pre>alias rmc=\"find . -iname core -exec rm {} \\;\"\r\n# rmc<\/pre>\n<h3>15. \u7528find\u547d\u4ee4\u5220\u9664\u5927\u578b\u6253\u5305\u6587\u4ef6<\/h3>\n<p>\u4e0b\u9762\u7684\u547d\u4ee4\u5220\u9664\u5927\u4e8e100M\u7684*.<span class=\"wp_keywordlink\"><a title=\"zip\u547d\u4ee4\" href=\"https:\/\/man.linuxde.net\/zip\" target=\"_blank\">zip<\/a><\/span>\u6587\u4ef6\u3002<\/p>\n<pre>find \/ -type f -name *.zip -size +100M -exec rm -i {} \\;\"<\/pre>\n<p>\u7528\u522b\u540drm100m\u5220\u9664\u6240\u6709\u5927\u96e8100M\u7684*.<span class=\"wp_keywordlink\"><a title=\"tar\u547d\u4ee4\" href=\"https:\/\/man.linuxde.net\/tar\" target=\"_blank\">tar<\/a><\/span>\u6587\u4ef6\u3002\u4f7f\u7528\u540c\u6837\u7684\u601d\u60f3\u53ef\u4ee5\u521b\u5efarm1g,rm2g,rm5g\u7684\u4e00\u7c7b\u522b\u540d\u6765\u5220\u9664\u6240\u6709\u5927\u4e8e1G,2G,5G\u7684\u6587\u4ef6\u3002<\/p>\n<pre>alias rm100m=\"find \/ -type f -name *.tar -size +100M -exec rm -i {} \\;\"\r\n# alias rm1g=\"find \/ -type f -name *.tar -size +1G -exec rm -i {} \\;\"\r\n# alias rm2g=\"find \/ -type f -name *.tar -size +2G -exec rm -i {} \\;\"\r\n# alias rm5g=\"find \/ -type f -name *.tar -size +5G -exec rm -i {} \\;\"\r\n \r\n# rm100m\r\n# rm1g\r\n# rm2g\r\n# rm5g<\/pre>\n<p><strong>\u57fa\u4e8e\u8bbf\u95ee\/\u4fee\u6539\/\u66f4\u6539\u65f6\u95f4\u67e5\u627e\u6587\u4ef6<\/strong><\/p>\n<p>\u4f60\u53ef\u4ee5\u627e\u5230\u57fa\u4e8e\u4ee5\u4e0b\u4e09\u4e2a\u6587\u4ef6\u7684\u65f6\u95f4\u5c5e\u6027\u7684\u6587\u4ef6\u3002<\/p>\n<ul>\n<li>\u8bbf\u95ee\u65f6\u95f4\u7684\u6587\u4ef6\u3002\u6587\u4ef6\u8bbf\u95ee\u65f6\uff0c\u8bbf\u95ee\u65f6\u95f4\u5f97\u5230\u66f4\u65b0\u3002<\/li>\n<li>\u7684\u6587\u4ef6\u7684\u4fee\u6539\u65f6\u95f4\u3002\u6587\u4ef6\u5185\u5bb9\u4fee\u6539\u65f6\uff0c\u4fee\u6539\u65f6\u95f4\u5f97\u5230\u66f4\u65b0\u3002<\/li>\n<li>\u66f4\u6539\u6587\u4ef6\u7684\u65f6\u95f4\u3002\u66f4\u6539\u65f6\u95f4\u65f6\uff0c\u88ab\u66f4\u65b0\u7684inode\u6570\u636e\u7684\u53d8\u5316\u3002<\/li>\n<\/ul>\n<p>\u5728\u4e0b\u9762\u7684\u4f8b\u5b50\u4e2d\uff0cmin\u9009\u9879\u4e4b\u95f4\u7684\u5dee\u5f02\u548c\u65f6\u95f4\u9009\u9879\u662f\u53c2\u6570\u3002<\/p>\n<p>\u5206\u8bba\u70b9\u5c06\u5b83\u7684\u53c2\u6570\u4e3a\u5206\u949f\u3002\u4f8b\u5982\uff0c60\u5206\u949f\uff081\u5c0f\u65f6\uff09= 60\u5206\u949f\u3002\u65f6\u95f4\u53c2\u6570\uff0c\u5c06\u5b83\u7684\u53c2\u6570\u4e3a24\u5c0f\u65f6\u3002\u4f8b\u5982\uff0c\u65f6\u95f42 = 2 * 24\u5c0f\u65f6\uff082\u5929\uff09\u3002\u867d\u7136\u8fd9\u6837\u505a\u768424\u4e2a\u5c0f\u65f6\u8ba1\u7b97\uff0c\u5c0f\u6570\u90e8\u5206\u90fd\u5c06\u88ab\u5ffd\u7565\uff0c\u6240\u4ee525\u5c0f\u65f6\u4e3a24\u5c0f\u65f6\uff0c\u548c47\u5c0f\u65f6\u53d6\u4e3a24\u5c0f\u65f6\uff0c\u4ec548\u5c0f\u65f6\u4e3a48\u5c0f\u65f6\u3002\u8981\u83b7\u5f97\u66f4\u6e05\u6670\u7684\u53c2\u8003atime\u7684\u90e8\u5206find\u547d\u4ee4\u7684\u624b\u518c\u9875\u3002<\/p>\n<h3>16.\u627e\u5230\u57281\u4e2a\u5c0f\u65f6\u5185\u88ab\u66f4\u6539\u7684\u6587\u4ef6<\/h3>\n<p>\u60f3\u8981\u901a\u8fc7\u6587\u4ef6\u4fee\u6539\u65f6\u95f4\u627e\u51fa\u6587\u4ef6\uff0c\u53ef\u4ee5\u4f7f\u7528\u53c2\u6570 -mmin -mtime\u3002\u4e0b\u9762\u662f<span class=\"wp_keywordlink\"><a title=\"man\u547d\u4ee4\" href=\"https:\/\/man.linuxde.net\/man\" target=\"_blank\">man<\/a><\/span>\u624b\u518c\u4e2d\u6709\u5173mmin\u548cmtime\u7684\u5b9a\u4e49\u3002<\/p>\n<p>-mmin n\u00a0\u6587\u4ef6\u6700\u540e\u4e00\u6b21\u4fee\u6539\u662f\u5728n\u5206\u949f\u4e4b\u5185<br \/>\n-mtime n\u00a0\u6587\u4ef6\u6700\u540e\u4e00\u6b21\u4fee\u6539\u662f\u5728\u00a0n*24\u5c0f\u65f6\u4e4b\u5185\uff08\u8bd1\u8005\u6ce8\uff1a\u4e5f\u5c31\u662fn\u5929\u4e86\u5457\uff09<\/p>\n<p>\u6267\u884c\u4e0b\u9762\u4f8b\u5b50\u4e2d\u7684\u547d\u4ee4\uff0c\u5c06\u4f1a\u627e\u5230\u5f53\u524d\u76ee\u5f55\u4ee5\u53ca\u5176\u5b50\u76ee\u5f55\u4e0b\uff0c\u6700\u8fd1\u4e00\u6b21\u4fee\u6539\u65f6\u95f4\u57281\u4e2a\u5c0f\u65f6\uff0860\u5206\u949f\uff09\u4e4b\u5185\u7684\u6587\u4ef6\u6216\u76ee\u5f55<\/p>\n<pre># find . -amin -60<\/pre>\n<p>\u540c\u6837\u7684\u65b9\u5f0f\uff0c\u6267\u884c\u4e0b\u9762\u4f8b\u5b50\u4e2d\u7684\u547d\u4ee4\uff0c\u5c06\u4f1a\u627e\u523024\u5c0f\u65f6\uff081\u5929\uff09\u5185\u88ab\u8bbf\u95ee\u4e86\u7684\u6587\u4ef6\uff08\u6587\u4ef6\u7cfb\u7edf\u6839\u76ee\u5f55 \/ \u4e0b\uff09<\/p>\n<pre># find \/ -atime -1<\/pre>\n<h3>17.\u627e\u52301\u4e2a\u5c0f\u65f6\u5185\u88ab\u8bbf\u95ee\u8fc7\u7684\u6587\u4ef6<\/h3>\n<p>\u60f3\u8981\u901a\u8fc7\u6587\u4ef6\u8bbf\u95ee\u65f6\u95f4\u627e\u51fa\u6587\u4ef6\uff0c\u53ef\u4ee5\u4f7f\u7528\u53c2\u6570 -amin -atime\u3002\u4e0b\u9762\u662fman\u624b\u518c\u4e2d\u6709\u5173amin\u548catime\u7684\u5b9a\u4e49\u3002<\/p>\n<p>-amin n\u00a0\u6587\u4ef6\u6700\u540e\u4e00\u6b21\u8bbf\u95ee\u662f\u5728n\u5206\u949f\u4e4b\u5185<br \/>\n-atime n\u00a0\u6587\u4ef6\u6700\u540e\u4e00\u6b21\u8bbf\u95ee\u662f\u5728\u00a0n*24\u5c0f\u65f6\u4e4b\u5185<\/p>\n<p>\u6267\u884c\u4e0b\u9762\u4f8b\u5b50\u4e2d\u7684\u547d\u4ee4\uff0c\u5c06\u4f1a\u627e\u5230\u5f53\u524d\u76ee\u5f55\u4ee5\u53ca\u5176\u5b50\u76ee\u5f55\u4e0b\uff0c\u6700\u8fd1\u4e00\u6b21\u8bbf\u95ee\u65f6\u95f4\u57281\u4e2a\u5c0f\u65f6\uff0860\u5206\u949f\uff09\u4e4b\u5185\u7684\u6587\u4ef6\u6216\u76ee\u5f55<\/p>\n<pre># find . -amin -60<\/pre>\n<p>\u540c\u6837\u7684\u65b9\u5f0f\uff0c\u6267\u884c\u4e0b\u9762\u4f8b\u5b50\u4e2d\u7684\u547d\u4ee4\uff0c\u5c06\u4f1a\u627e\u523024\u5c0f\u65f6\uff081\u5929\uff09\u5185\u88ab\u8bbf\u95ee\u4e86\u7684\u6587\u4ef6\uff08\u6587\u4ef6\u7cfb\u7edf\u6839\u76ee\u5f55 \/ \u4e0b\uff09<\/p>\n<pre># find \/ -atime -1<\/pre>\n<h3>18.\u67e5\u627e\u4e00\u4e2a\u5c0f\u65f6\u5185\u72b6\u6001\u88ab\u6539\u53d8\u7684\u6587\u4ef6<\/h3>\n<p>\uff08\u8bd1\u8005\u6ce8\uff1a\u8fd9\u91cc\u7684\u6539\u53d8\u66f4\u7b2c1\u4e2a\u4f8b\u5b50\u7684\u66f4\u6539\u6587\u4ef6\u5185\u5bb9\u65f6\u95f4\u662f\u4e0d\u540c\u6982\u5ff5\uff0c\u8fd9\u91cc\u662f\u66f4\u6539\u7684\u662f\u6587\u4ef6inode\u7684\u6570\u636e\uff0c\u6bd4\u5982\u6587\u4ef6\u7684\u6743\u9650\uff0c\u6240\u5c5e\u4eba\u7b49\u7b49\u4fe1\u606f\uff09<\/p>\n<p>\u8981\u67e5\u627e\u6587\u4ef6\u7684inode\u7684\u66f4\u6539\u65f6\u95f4\uff0c\u4f7f\u7528-cmin\u548c-ctime\u9009\u9879<\/p>\n<p>-cmin n\u00a0\u00a0\u6587\u4ef6\u7684\u72b6\u6001\u5728n\u5206\u949f\u5185\u88ab\u6539\u53d8<br \/>\n-ctime n\u00a0\u00a0\u6587\u4ef6\u72b6\u6001\u5728n*24\u5c0f\u65f6\u5185\uff08\u4e5f\u5c31\u662fn\u5929\u5185\uff09\u88ab\u6539\u53d8<\/p>\n<p>\uff08\u8bd1\u8005\u6ce8\uff1a\u5982\u679c\u4e0a\u9762\u7684n\u4e3a-n\u5f62\u5f0f\uff0c\u5219\u8868\u793an\u5206\u949f\/\u5929\u4e4b\u5185\uff0cn\u4e3a+n\u5219\u8868\u793an\u5206\u949f\/\u5929\u4e4b\u524d\uff09<\/p>\n<p>\u4e0b\u9762\u7684\u4f8b\u5b50\u5728\u5f53\u524d\u76ee\u5f55\u548c\u5176\u5b50\u76ee\u5f55\u4e0b\u9762\u67e5\u627e\u4e00\u4e2a\u5c0f\u65f6\u5185\u6587\u4ef6\u72b6\u6001\u6539\u53d8\u7684\u6587\u4ef6\uff08\u4e5f\u5c31\u662f60\u5206\u949f\u5185\uff09\uff1a<\/p>\n<pre># find . -cmin -60<\/pre>\n<p>\u540c\u6837\u7684\u9053\u7406\uff0c\u4e0b\u9762\u7684\u4f8b\u5b50\u5728\u6839\u76ee\u5f55\/\u53ca\u5176\u5b50\u76ee\u5f55\u4e0b\u4e00\u5929\u5185\uff0824\u5c0f\u65f6\u5185\uff09\u6587\u4ef6\u72b6\u6001\u88ab\u6539\u53d8\u7684\u6587\u4ef6\u5217\u8868\uff1a<\/p>\n<pre># find \/ -ctime -1<\/pre>\n<h3>19.\u641c\u7d22\u4ec5\u4ec5\u9650\u5b9a\u4e8e\u6587\u4ef6\uff0c\u4e0d\u663e\u793a\u6587\u4ef6\u5939<\/h3>\n<p>\u4e0a\u9762\u7684\u4f8b\u5b50\u641c\u7d22\u51fa\u6765\u4e0d\u4ec5\u4ec5\u6709\u6587\u4ef6\uff0c\u8fd8\u4f1a\u663e\u793a\u6587\u4ef6\u5939\u3002\u56e0\u4e3a\u5f53\u4e00\u4e2a\u6587\u4ef6\u88ab\u8bbf\u95ee\u7684\u65f6\u5019\uff0c\u5b83\u6240\u5904\u7684\u6587\u4ef6\u5939\u4e5f\u4f1a\u88ab\u8bbf\u95ee\uff0c\u5982\u679c\u4f60\u5bf9\u6587\u4ef6\u5939\u4e0d\u611f\u5174\u8da3\uff0c\u90a3\u4e48\u53ef\u4ee5\u4f7f\u7528 -type f \u9009\u9879<\/p>\n<p>\u4e0b\u9762\u7684\u4f8b\u5b50\u4f1a\u663e\u793a30\u5206\u949f\u5185\u88ab\u4fee\u6539\u8fc7\u7684\u6587\u4ef6\uff0c\u6587\u4ef6\u5939\u4e0d\u663e\u793a\uff1a<\/p>\n<pre># find \/etc\/sysconfig -amin -30\r\n.\r\n.\/console\r\n.\/network-scripts\r\n.\/i18n\r\n.\/rhn\r\n.\/rhn\/clientCaps.d\r\n.\/networking\r\n.\/networking\/profiles\r\n.\/networking\/profiles\/default\r\n.\/networking\/profiles\/default\/resolv.conf\r\n.\/networking\/profiles\/default\/hosts\r\n.\/networking\/devices\r\n.\/apm-scripts\r\n[\u6ce8: \u4e0a\u9762\u7684\u8f93\u51fa\u5305\u542b\u4e86\u6587\u4ef6\u548c\u6587\u4ef6\u5939]\r\n \r\n# find \/etc\/sysconfig -amin -30 -type f\r\n.\/i18n\r\n.\/networking\/profiles\/default\/resolv.conf\r\n.\/networking\/profiles\/default\/hosts\r\n[\u6ce8: \u4e0a\u9762\u7684\u8f93\u51fa\u4ec5\u4ec5\u5305\u542b\u6587\u4ef6]<\/pre>\n<h3>20.\u4ec5\u4ec5\u67e5\u627e\u975e\u9690\u85cf\u7684\u6587\u4ef6\uff08\u4e0d\u663e\u793a\u9690\u85cf\u6587\u4ef6\uff09\uff1a<\/h3>\n<p>\u5982\u679c\u6211\u4eec\u67e5\u627e\u7684\u65f6\u5019\u4e0d\u60f3\u9690\u85cf\u6587\u4ef6\u4e5f\u663e\u793a\u51fa\u6765\uff0c\u53ef\u4ee5\u4f7f\u7528\u4e0b\u9762\u7684\u6b63\u5219\u5f0f\u67e5\u627e\uff1a<\/p>\n<p>\u4e0b\u9762\u7684\u547d\u4ee4\u4f1a\u663e\u793a\u5f53\u524d\u76ee\u5f55\u53ca\u5176\u5b50\u76ee\u5f55\u4e0b15\u5206\u949f\u5185\u6587\u4ef6\u5185\u5bb9\u88ab\u4fee\u6539\u8fc7\u7684\u6587\u4ef6\uff0c\u5e76\u4e14\u53ea\u5217\u51fa\u975e\u9690\u85cf\u6587\u4ef6\u3002\u4e5f\u5c31\u662f\u8bf4\uff0c\u4ee5.\u5f00\u5934\u7684\u6587\u4ef6\u65f6\u4e0d\u4f1a\u663e\u793a\u51fa\u6765\u7684<\/p>\n<pre># find . -mmin -15 \\( ! -regex \".*\/\\..*\" \\)<\/pre>\n<p>\u57fa\u4e8e\u6587\u4ef6\u6bd4\u8f83\u7684\u67e5\u627e\u547d\u4ee4<\/p>\n<p>\u6211\u4eec\u5e73\u65f6\u901a\u8fc7\u66f4\u522b\u7684\u4e1c\u897f\u8fdb\u884c\u6bd4\u8f83\uff0c\u4f1a\u66f4\u5bb9\u6613\u8bb0\u4f4f\u4e00\u4e9b\u4e8b\u60c5\u3002\u6bd4\u5982\u8bf4\u6211\u60f3\u627e\u51fa\u5728\u6211\u7f16\u8f91test\u6587\u4ef6\u4e4b\u540e\u7f16\u8f91\u8fc7\u7684\u6587\u4ef6\u3002\u4f60\u53ef\u4ee5\u901a\u8fc7test\u8fd9\u4e2a\u6587\u4ef6\u7684\u7f16\u8f91\u65f6\u95f4\u4f5c\u4e3a\u6bd4\u8f83\u57fa\u51c6\u53bb\u67e5\u627e\u4e4b\u540e\u7f16\u8f91\u8fc7\u7684\u6587\u4ef6\uff1a<\/p>\n<h3>21.\u67e5\u627e\u6587\u4ef6\u4fee\u6539\u65f6\u95f4\u5728\u67d0\u4e00\u6587\u4ef6\u4fee\u6539\u540e\u7684\u6587\u4ef6\uff1a<\/h3>\n<pre>\u8bed\u6cd5\uff1a find -newer FILE<\/pre>\n<p>\u4e0b\u9762\u7684\u4f8b\u5b50\u663e\u793a\u5728\/etc\/passwd\u4fee\u6539\u4e4b\u540e\u88ab\u4fee\u6539\u8fc7\u7684\u6587\u4ef6\u3002\u5bf9\u4e8e\u7cfb\u7edf\u7ba1\u7406\u5458\uff0c\u60f3\u77e5\u9053\u4f60\u65b0\u589e\u4e86\u4e00\u4e2a\u7528\u6237\u540e\u53bb\u8ddf\u8e2a\u7cfb\u7edf\u7684\u6d3b\u52a8\u72b6\u6001\u662f\u5f88\u6709\u5e2e\u52a9\u7684\uff08\u4e07\u4e00\u90a3\u65b0\u7528\u6237\u4e0d\u8001\u5b9e\uff0c\u4e00\u4e0a\u6765\u5c31\u4e71\u641e\uff0c\u4f60\u5f88\u5feb\u5c31\u77e5\u9053\u4e86 \u00a0^_^\uff09\uff1a<\/p>\n<pre># find -newer \/etc\/passwd<\/pre>\n<h3>22.\u67e5\u627e\u6587\u4ef6\u8bbf\u95ee\u65f6\u95f4\u5728\u67d0\u4e00\u6587\u4ef6\u7684\u4fee\u6539\u65f6\u95f4\u4e4b\u540e\u7684\u6587\u4ef6\uff1a<\/h3>\n<pre># find -newer \/etc\/passwd<\/pre>\n<p>\u4e0b\u9762\u7684\u4f8b\u5b50\u663e\u793a\u6240\u6709\u5728\/etc\/hosts\u6587\u4ef6\u88ab\u4fee\u6539\u540e\u88ab\u8bbf\u95ee\u5230\u7684\u6587\u4ef6\u3002\u5982\u679c\u4f60\u65b0\u589e\u4e86\u4e00\u4e2a\u4e3b\u673a\/\u7aef\u53e3\u8bb0\u5f55\u5728\/etc\/hosts\u6587\u4ef6\u4e2d\uff0c\u4f60\u5f88\u53ef\u80fd\u5f88\u60f3\u77e5\u9053\u5728\u90a3\u4e4b\u540e\u6709\u4ec0\u4e48\u6587\u4ef6\u88ab\u8bbf\u95ee\u5230\u4e86\uff0c\u4e0b\u9762\u662f\u8fd9\u4e2a\u547d\u4ee4\uff1a<\/p>\n<pre># find -anewer \/etc\/hosts<\/pre>\n<h3>23.\u67e5\u627e\u72b6\u6001\u6539\u53d8\u65f6\u95f4\u5728\u67d0\u4e2a\u6587\u4ef6\u4fee\u6539\u65f6\u95f4\u4e4b\u540e\u7684\u6587\u4ef6\uff1a<\/h3>\n<pre>\u8bed\u6cd5\uff1a find -cnewer FILE<\/pre>\n<p>\u4e0b\u9762\u7684\u4f8b\u5b50\u663e\u793a\u5728\u4fee\u6539\u6587\u4ef6\/etc\/fstab\u4e4b\u540e\u6240\u6709\u6587\u4ef6\u72b6\u6001\u6539\u53d8\u8fc7\u7684\u6587\u4ef6\u3002\u5982\u679c\u4f60\u5728\/etc\/fstab\u65b0\u589e\u4e86\u4e00\u4e2a\u6302\u8f7d\u70b9\uff0c\u4f60\u5f88\u53ef\u80fd\u60f3\u77e5\u9053\u4e4b\u540e\u54ea\u4e9b\u6587\u4ef6\u7684\u72b6\u6001\u53d1\u751f\u4e86\u6539\u53d8\uff0c\u8fd9\u65f6\u5019\u4f60\u53ef\u4ee5\u4f7f\u7528\u5982\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre># find -cnewer \/etc\/fstab<\/pre>\n<p>\u5728\u67e5\u627e\u5230\u7684\u6587\u4ef6\u5217\u8868\u7ed3\u679c\u4e0a\u76f4\u63a5\u6267\u884c\u547d\u4ee4\uff1a<\/p>\n<p>\u8fd9\u4e4b\u524d\u4f60\u5df2\u7ecf\u770b\u5230\u4e86\u5982\u679c\u901a\u8fc7find\u547d\u4ee4\u53bb\u67e5\u627e\u5404\u79cd\u6761\u4ef6\u7684\u6587\u4ef6\u5217\u8868\u3002\u5982\u679c\u4f60\u5bf9\u8fd9\u4e9bfind\u547d\u4ee4\u8fd8\u4e0d\u719f\u6089\uff0c\u6211\u5efa\u8bae\u4f60\u770b\u5b8c\u4e0a\u9762\u7684\u7b2c\u4e00\u90e8\u5206<\/p>\n<p>\u63a5\u4e0b\u6765\u8fd9\u90e8\u5206\u6211\u4eec\u5411\u4f60\u4ecb\u7ecd\u5982\u679c\u5728find\u547d\u4ee4\u4e0a\u6267\u884c\u5404\u79cd\u4e0d\u540c\u7684\u547d\u4ee4\uff0c\u4e5f\u5c31\u662f\u8bf4\u5982\u4f55\u53bb\u64cd\u4f5cfind\u547d\u4ee4\u67e5\u627e\u51fa\u6765\u7684\u6587\u4ef6\u5217\u8868\u3002<\/p>\n<p>\u6211\u4eec\u80fd\u5728find\u547d\u4ee4\u67e5\u627e\u51fa\u6765\u7684\u6587\u4ef6\u540d\u5217\u8868\u4e0a\u6307\u5b9a\u4efb\u610f\u7684\u64cd\u4f5c\uff1a<\/p>\n<pre># find &lt;CONDITION to Find files&gt; -exec &lt;OPERATION&gt; \\;<\/pre>\n<p>\u5176\u4e2d\u7684OPERATION\u53ef\u4ee5\u662f\u4efb\u610f\u7684\u547d\u4ee4\uff0c\u4e0b\u9762\u5217\u4e3e\u4e00\u4e0b\u6bd4\u8f83\u5e38\u7528\u7684\uff1a<\/p>\n<p>rm \u547d\u4ee4\uff0c\u7528\u4e8e\u5220\u9664find\u67e5\u627e\u51fa\u6765\u7684\u6587\u4ef6<br \/>\nmv \u547d\u4ee4\uff0c\u7528\u4e8e\u91cd\u547d\u540d\u67e5\u627e\u51fa\u7684\u6587\u4ef6<br \/>\nls -l \u547d\u4ee4\uff0c\u663e\u793a\u67e5\u627e\u51fa\u7684\u6587\u4ef6\u7684\u8be6\u7ec6\u4fe1\u606f<br \/>\nmd5sum\uff0c \u5bf9\u67e5\u627e\u51fa\u7684\u6587\u4ef6\u8fdb\u884cmd5sum\u8fd0\u7b97\uff0c\u53ef\u4ee5\u83b7\u5f97\u4e00\u4e2a\u5b57\u7b26\u4e32\uff0c\u7528\u4e8e\u68c0\u6d4b\u6587\u4ef6\u5185\u5bb9\u7684\u5408\u6cd5\u6027<br \/>\n<span class=\"wp_keywordlink\"><a title=\"wc\u547d\u4ee4\" href=\"https:\/\/man.linuxde.net\/wc\" target=\"_blank\">wc<\/a><\/span> \u547d\u4ee4\uff0c\u7528\u4e8e\u7edf\u8ba1\u8ba1\u7b97\u6587\u4ef6\u7684\u5355\u8bcd\u6570\u91cf\uff0c\u6587\u4ef6\u5927\u5c0f\u7b49\u5f85<br \/>\n\u6267\u884c\u4efb\u4f55Unix\u7684<span class=\"wp_keywordlink\"><a title=\"Shell\" href=\"https:\/\/www.linuxde.net\/tag\/shell\" target=\"_blank\">Shell<\/a><\/span>\u547d\u4ee4<br \/>\n\u6267\u884c\u4f60\u81ea\u5df1\u5199\u7684shell\u811a\u672c\uff0c\u53c2\u6570\u5c31\u662f\u6bcf\u4e2a\u67e5\u627e\u51fa\u6765\u7684\u6587\u4ef6\u540d<\/p>\n<h3>24.\u5728find\u547d\u4ee4\u8f93\u51fa\u4e0a\u4f7f\u7528 ls -l\uff0c \u5217\u4e3e\u51fa1\u5c0f\u65f6\u5185\u88ab\u7f16\u8f91\u8fc7\u7684\u6587\u4ef6\u7684\u8be6\u7ec6\u4fe1\u606f<\/h3>\n<pre># find -mmin -60\r\n.\/cron\r\n.\/secure\r\n \r\n # find -mmin -60 -exec ls -l {} \\;\r\n-rw-------  1 root root 1028 Jun 21 15:01 .\/cron\r\n-rw-------  1 root root 831752 Jun 21 15:42 .\/secure<\/pre>\n<h3>25.\u4ec5\u4ec5\u5728\u5f53\u524d\u6587\u4ef6\u7cfb\u7edf\u4e2d\u641c\u7d22<\/h3>\n<p>\u7cfb\u7edf\u7ba1\u7406\u5458\u6709\u65f6\u5019\u4ec5\u4ec5\u60f3\u5728\/\u6302\u8f7d\u7684\u6587\u4ef6\u7cfb\u7edf\u5206\u533a\u4e0a\u641c\u7d22\uff0c\u800c\u4e0d\u60f3\u53bb\u641c\u7d22\u5176\u4ed6\u7684\u6302\u8f7d\u5206\u533a\uff0c\u6bd4\u5982\/home\/\u6302\u8f7d\u5206\u533a\u3002\u5982\u679c\u4f60\u6709\u591a\u4e2a\u5206\u533a\u88ab\u6302\u8f7d\u4e86\uff0c\u4f60\u60f3\u5728\/\u4e0b\u641c\u7d22\uff0c\u4e00\u822c\u53ef\u4ee5\u6309\u4e0b\u9762\u7684\u8fd9\u6837\u505a<\/p>\n<p>\u4e0b\u9762\u8fd9\u4e2a\u547d\u4ee4\u4f1a\u641c\u7d22\u6839\u76ee\u5f55\/\u53ca\u5176\u5b50\u76ee\u5f55\u4e0b\u6240\u6709.log\u7ed3\u5c3e\u7684\u6587\u4ef6\u540d\u3002\u5982\u679c\u4f60\u6709\u591a\u4e2a\u5206\u533a\u5728\/\u4e0b\u9762\uff0c\u90a3\u4e48\u8fd9\u4e2a\u641c\u7d22\u4f1a\u53bb\u641c\u7d22\u6240\u6709\u7684\u88ab\u6302\u8f7d\u7684\u5206\u533a\uff1a<\/p>\n<pre># find \/ -name \"*.log\"<\/pre>\n<p>\u5982\u679c\u6211\u4eec\u4f7f\u7528-xdev\u9009\u9879\uff0c\u90a3\u4e48\u4ec5\u4ec5\u4f1a\u5728\u5728\u5f53\u524d\u6587\u4ef6\u7cfb\u7edf\u4e2d\u641c\u7d22\uff0c\u4e0b\u9762\u662f\u5728xdev\u7684man page\u4e0a\u9762\u627e\u5230\u7684\u4e00\u6bb5-xdev\u7684\u5b9a\u4e49\uff1a<\/p>\n<pre>-xdev Don\u2019t descend directories on other filesystems.<\/pre>\n<p>\u4e0b\u9762\u7684\u547d\u4ee4\u4f1a\u5728\/\u76ee\u5f55\u53ca\u5176\u5b50\u76ee\u5f55\u4e0b\u641c\u7d22\u5f53\u524d\u6587\u4ef6\u7cfb\u7edf(\u4e5f\u5c31\u662f\/\u6302\u8f7d\u7684\u6587\u4ef6\u7cfb\u7edf)\u4e2d\u6240\u6709\u4ee5.log\u7ed3\u5c3e\u7684\u6587\u4ef6\uff0c\u4e5f\u5c31\u662f\u8bf4\u5982\u679c\u4f60\u6709\u591a\u4e2a\u5206\u533a\u6302\u8f7d\u5728\/\u4e0b\u9762\uff0c\u4e0b\u9762\u7684\u641c\u7d22\u4e0d\u4f1a\u53bb\u641c\u7d22\u5176\u4ed6\u7684\u5206\u533a\u7684\uff08\u6bd4\u5982\/home\/\uff09<\/p>\n<pre># find \/ -xdev -name \"*.log\"<\/pre>\n<h3>26.\u5728\u540c\u4e00\u4e2a\u547d\u4ee4\u4e2d\u4f7f\u7528\u591a\u4e2a{}<\/h3>\n<p>linux\u624b\u518c\u8bf4\u547d\u4ee4\u4e2d\u53ea\u80fd\u4f7f\u7528\u4e00\u4e2a{}\uff0c\u4e0d\u8fc7\u4f60\u53ef\u4ee5\u50cf\u4e0b\u9762\u8fd9\u6837\u5728\u540c\u4e00\u4e2a\u547d\u4ee4\u4e2d\u4f7f\u7528\u591a\u4e2a{}<\/p>\n<pre># find -name \"*.txt\" <span class=\"wp_keywordlink\"><a title=\"cp\u547d\u4ee4\" href=\"https:\/\/man.linuxde.net\/cp\" target=\"_blank\">cp<\/a><\/span> {} {}.bkup \\;<\/pre>\n<p>\u6ce8\u610f\uff0c\u5728\u540c\u4e00\u4e2a\u547d\u4ee4\u4e2d\u4f7f\u7528\u8fd9\u4e2a{}\u662f\u53ef\u4ee5\u7684\uff0c\u4f46\u662f\u5728\u4e0d\u540c\u7684\u547d\u4ee4\u91cc\u5c31\u4e0d\u884c\u4e86\uff0c\u4e5f\u5c31\u662f\u8bf4\uff0c\u5982\u679c\u4f60\u60f3\u8c61\u4e0b\u9762\u8fd9\u6837\u91cd\u547d\u540d\u6587\u4ef6\u662f\u884c\u4e0d\u901a\u7684<\/p>\n<pre>find -name \"*.txt\" -exec mv {} `<span class=\"wp_keywordlink\"><a title=\"basename\u547d\u4ee4\" href=\"https:\/\/man.linuxde.net\/basename\" target=\"_blank\">basename<\/a><\/span> {} .htm`.html \\;<\/pre>\n<h3>27. \u4f7f\u7528\u591a\u4e2a{}\u5b9e\u4f8b<\/h3>\n<p>\u4f60\u53ef\u4ee5\u50cf\u4e0b\u9762\u8fd9\u6837\u5199\u4e00\u4e2ashell\u811a\u672c\u53bb\u6a21\u62df\u4e0a\u9762\u90a3\u4e2a\u91cd\u547d\u540d\u7684\u4f8b\u5b50<\/p>\n<pre># mv \"$1\" \"`basename \"$1\" .htm`.html\"<\/pre>\n<p>\u4e0a\u9762\u7684\u53cc\u5f15\u53f7\u662f\u4e3a\u4e86\u9632\u6b62\u6587\u4ef6\u540d\u4e2d\u51fa\u73b0\u7684\u7a7a\u683c\uff0c\u4e0d\u52a0\u7684\u8bdd\u4f1a\u6709\u95ee\u9898\u3002\u7136\u540e\u4f60\u628a\u8fd9\u4e2ashell\u811a\u672c\u4fdd\u5b58\u4e3amv.sh\uff0c\u4f60\u53ef\u4ee5\u50cf\u4e0b\u9762\u8fd9\u6837\u4f7f\u7528find\u547d\u4ee4\u4e86<\/p>\n<pre>find -name \"*.html\" -exec .\/mv.sh '{}' \\;<\/pre>\n<p>\u6240\u4ee5\uff0c\u4efb\u4f55\u60c5\u51b5\u4e0b\u4f60\u5728find\u547d\u4ee4\u6267\u884c\u4e2d\u60f3\u4f7f\u7528\u540c\u4e00\u4e2a\u6587\u4ef6\u540d\u591a\u6b21\u7684\u8bdd\uff0c\u5148\u5199\u4e00\u4e2a\u811a\u672c\uff0c\u7136\u540e\u5728find\u4e2d\u901a\u8fc7-exec\u6267\u884c\u8fd9\u4e2a\u811a\u672c\uff0c\u628a\u6587\u4ef6\u540d\u53c2\u6570\u4f20\u9012\u8fdb\u53bb\u5c31\u884c\uff0c\u8fd9\u662f\u6700\u7b80\u5355\u7684\u529e\u6cd5<\/p>\n<h3>28.\u5c06\u9519\u8bef\u91cd\u5b9a\u5411\u5230\/dev\/nul<\/h3>\n<p>\u91cd\u5b9a\u5411\u9519\u8bef\u8f93\u51fa\u4e00\u822c\u4e0d\u662f\u4ec0\u4e48\u597d\u7684\u60f3\u6cd5\u3002\u4e00\u4e2a\u6709\u7ecf\u9a8c\u7684\u7a0b\u5e8f\u5458\u61c2\u5f97\u5728\u7ec8\u7aef\u663e\u793a\u9519\u8bef\u5e76\u53ca\u65f6\u4fee\u6b63\u5b83\u662f\u5f88\u91cd\u8981\u7684\u3002<\/p>\n<p>\u5c24\u5176\u662f\u5728find\u547d\u4ee4\u4e2d\u91cd\u5b9a\u5411\u9519\u8bef\u4e0d\u662f\u4e2a\u597d\u7684\u5b9e\u8df5\u3002 \u4f46\u662f\u5982\u679c\u4f60\u786e\u5b9e\u4e0d\u60f3\u770b\u5230\u90a3\u4e9b\u70e6\u4eba\u7684\u9519\u8bef\uff0c\u60f3\u628a\u9519\u8bef\u90fd\u91cd\u5b9a\u5411\u5230null\u8bbe\u5907\u4e2d\uff08\u4e5f\u5c31\u662flinux\u4e0a\u7684\u9ed1\u6d1e\u88c5\u7f6e\uff0c\u4efb\u4f55\u4e22\u8fdb\u53bb\u7684\u4e1c\u897f\u6d88\u5931\u7684\u65e0\u5f71\u65e0\u8e2a\u4e86\uff09\u3002\u4f60\u53ef\u4ee5\u50cf\u4e0b\u9762\u8fd9\u6837\u505a<\/p>\n<pre>find -name \"*.txt\" 2&gt;&gt;\/dev\/null<\/pre>\n<p>\u6709\u65f6\u5019\u8fd9\u662f\u5f88\u6709\u7528\u7684\u3002\u6bd4\u5982\uff0c\u5982\u679c\u4f60\u60f3\u901a\u8fc7\u4f60\u81ea\u5df1\u7684\u8d26\u53f7\u5728\/\u76ee\u5f55\u4e0b\u67e5\u627e\u6240\u6709\u7684*.conf\u6587\u4ef6\uff0c\u4f60\u4f1a\u5f97\u5230\u5f88\u591a\u5f88\u591a\u7684\u201dPermission denied\u201d\u7684\u9519\u8bef\u6d88\u606f\uff0c \u5c31\u50cf\u4e0b\u9762\u8fd9\u6837\uff1a<\/p>\n<pre>$ find \/ -name \"*.conf\"\r\n\/sbin\/generate-<span class=\"wp_keywordlink\"><a title=\"modprobe\u547d\u4ee4\" href=\"https:\/\/man.linuxde.net\/modprobe\" target=\"_blank\">modprobe<\/a><\/span>.conf\r\nfind: \/tmp\/orbit-root: Permission denied\r\nfind: \/tmp\/<span class=\"wp_keywordlink\"><a title=\"ssh\u547d\u4ee4\" href=\"https:\/\/man.linuxde.net\/ssh\" target=\"_blank\">ssh<\/a><\/span>-gccBMp5019: Permission denied\r\nfind: \/tmp\/keyring-5iqiGo: Permission denied\r\nfind: \/var\/log\/<span class=\"wp_keywordlink\"><a title=\"httpd\u547d\u4ee4\" href=\"https:\/\/man.linuxde.net\/httpd\" target=\"_blank\">httpd<\/a><\/span>: Permission denied\r\nfind: \/var\/log\/ppp: Permission denied\r\n\/boot\/<span class=\"wp_keywordlink\"><a title=\"grub\u547d\u4ee4\" href=\"https:\/\/man.linuxde.net\/grub\" target=\"_blank\">grub<\/a><\/span>\/grub.conf\r\nfind: \/var\/log\/audit: Permission denied\r\nfind: \/var\/log\/<span class=\"wp_keywordlink\"><a title=\"squid\u547d\u4ee4\" href=\"https:\/\/man.linuxde.net\/squid\" target=\"_blank\">squid<\/a><\/span>: Permission denied\r\nfind: \/var\/log\/samba: Permission denied\r\nfind: \/var\/cache\/alchemist\/printconf.<span class=\"wp_keywordlink\"><a title=\"rpm\u547d\u4ee4\" href=\"https:\/\/man.linuxde.net\/rpm\" target=\"_blank\">rpm<\/a><\/span>\/wm: Permission denied\r\n[Note: There are two valid *.conf files burned in the \"Permission denied\" messages]<\/pre>\n<p>\u4f60\u8bf4\u70e6\u4eba\u4e0d\uff1f\u6240\u4ee5\uff0c\u5982\u679c\u4f60\u53ea\u60f3\u770b\u5230find\u547d\u4ee4\u771f\u5b9e\u7684\u67e5\u627e\u7ed3\u679c\u800c\u4e0d\u662f\u8fd9\u4e9b\u201dPermission denied\u201d\u9519\u8bef\u6d88\u606f\uff0c\u4f60\u53ef\u4ee5\u5c06\u8fd9\u4e9b\u9519\u8bef\u6d88\u606f\u91cd\u5b9a\u5411\u5230\/dev\/null\u4e2d\u53bb<\/p>\n<pre>$ find \/ -name \"*.conf\" 2&gt;&gt;\/dev\/null\r\n\/sbin\/generate-modprobe.conf\r\n\/boot\/grub\/grub.conf\r\n[Note: All the \"Permission denied\" messages are not displayed]<\/pre>\n<h3>29.\u5c06\u6587\u4ef6\u540d\u4e2d\u7684\u7a7a\u683c\u6362\u6210\u4e0b\u5212\u7ebf<\/h3>\n<p>\u4f60\u4ece\u7f51\u4e0a\u4e0b\u8f7d\u4e0b\u6765\u7684\u97f3\u9891\u6587\u4ef6\u7684\u6587\u4ef6\u540d\u5f88\u591a\u90fd\u5e26\u6709\u7a7a\u683c\u3002\u4f46\u662f\u5e26\u6709\u7a7a\u683c\u7684\u6587\u4ef6\u540d\u5728linux(\u7c7bUnix)\u7cfb\u7edf\u91cc\u9762\u662f\u5f88\u4e0d\u597d\u7684\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528find\u7136\u540e\u540e\u9762\u52a0\u4e0a<span class=\"wp_keywordlink\"><a title=\"rename\u547d\u4ee4\" href=\"https:\/\/man.linuxde.net\/rename\" target=\"_blank\">rename<\/a><\/span>\u547d\u4ee4\u7684\u66ff\u6362\u529f\u80fd\u53bb\u91cd\u547d\u540d\u8fd9\u4e9b\u6587\u4ef6\uff0c\u5c06\u7a7a\u683c\u8f6c\u6362\u6210\u4e0b\u5212\u7ebf<\/p>\n<p>\u4e0b\u9762\u663e\u793a\u600e\u6837\u5c06\u6240\u6709mp3\u6587\u4ef6\u7684\u6587\u4ef6\u540d\u4e2d\u7684\u7a7a\u683c\u6362\u6210_<\/p>\n<pre>$ find . -type f -iname \u201c*.mp3\u2033 -exec rename \u201cs\/ \/_\/g\u201d {} \\;<\/pre>\n<h3>30.\u5728find\u7ed3\u679c\u4e2d\u540c\u65f6\u6267\u884c\u4e24\u6761\u547d\u4ee4<\/h3>\n<p>\u5728find\u7684man page\u9875\u9762\u4e2d\uff0c\u4e0b\u9762\u662f\u4e00\u6b21\u6587\u4ef6\u67e5\u627e\u904d\u5386\u4e2d\u4f7f\u7528\u4e24\u6761\u547d\u4ee4\u7684\u8bed\u6cd5\u4e3e\u4f8b<\/p>\n<p>\u4e0b\u9762\u7684find\u547d\u4ee4\u7684\u4f8b\u5b50\uff0c\u904d\u5386\u6587\u4ef6\u7cfb\u7edf\u4e00\u6b21\uff0c\u5217\u51fa\u62e5\u6709setuid\u5c5e\u6027\u7684\u6587\u4ef6\u548c\u76ee\u5f55\uff0c\u5199\u5165\/root\/suid.txt\u6587\u4ef6\uff0c \u5982\u679c\u6587\u4ef6\u5927\u5c0f\u8d85\u8fc7100M\uff0c\u5c06\u5176\u8bb0\u5f55\u5230\/root\/big.txt\u4e2d<\/p>\n<pre># find \/ \\( -perm -4000 -fprintf \/root\/suid.txt '%#m %u %p\\n' \\) , \\\r\n\\( -size +100M -fprintf \/root\/big.txt '%-10s %p\\n' \\)\r\n\r\n\r\n\u539f\u6587\u94fe\u63a5\uff1ahttps:\/\/www.linuxde.net\/2013\/09\/15290.html<\/pre>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u9664\u4e86\u5728\u4e00\u4e2a\u76ee\u5f55\u7ed3\u6784\u4e0b\u67e5\u627e\u6587\u4ef6\u8fd9\u79cd\u57fa\u672c\u7684\u64cd\u4f5c\uff0c\u4f60\u8fd8\u53ef\u4ee5\u7528find\u547d\u4ee4\u5b9e\u73b0\u4e00\u4e9b\u5b9e\u7528\u7684\u64cd\u4f5c\uff0c\u4f7f\u4f60\u7684\u547d\u4ee4\u884c\u4e4b\u65c5\u66f4\u52a0\u7b80\u6613 &#8230; <a title=\"30\u4e2a\u5b9e\u7528\u7684Linux find\u547d\u4ee4\u793a\u4f8b\" class=\"read-more\" href=\"https:\/\/cn.hostease.com\/xueyuan\/jishu\/30%e4%b8%aa%e5%ae%9e%e7%94%a8%e7%9a%84linux-find%e5%91%bd%e4%bb%a4%e7%a4%ba%e4%be%8b\/\" aria-label=\"\u9605\u8bfb 30\u4e2a\u5b9e\u7528\u7684Linux find\u547d\u4ee4\u793a\u4f8b\">\u9605\u8bfb\u66f4\u591a<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[49,5],"tags":[528],"class_list":["post-1661","post","type-post","status-publish","format-standard","hentry","category-linux","category-jishu","tag-linuxfind"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/posts\/1661","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/comments?post=1661"}],"version-history":[{"count":1,"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/posts\/1661\/revisions"}],"predecessor-version":[{"id":1662,"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/posts\/1661\/revisions\/1662"}],"wp:attachment":[{"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/media?parent=1661"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/categories?post=1661"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/tags?post=1661"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}