{"id":205062,"date":"2020-11-22T10:23:38","date_gmt":"2020-11-22T02:23:38","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=205062"},"modified":"2020-11-10T18:24:09","modified_gmt":"2020-11-10T10:24:09","slug":"linux-yunw","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/linux-yunw.html","title":{"rendered":"Linux \u8fd0\u7ef4\u5fc5\u5907\u7684 40 \u4e2a\u547d\u4ee4\u603b\u7ed3"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n\u4e3a\u5927\u5bb6\u4ecb\u7ecd40\u4e2a\u8fd0\u7ef4\u5e38\u7528\u7684\u547d\u4ee4\u603b\u7ed3<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

1\u3001\u5220\u96640\u5b57\u8282\u6587\u4ef6<\/p>\n

\r\nfind -type f -size 0 -exec rm -rf {} \\;<\/pre>\n

2\u3001\u67e5\u770b\u8fdb\u7a0b<\/p>\n

\u6309\u5185\u5b58\u4ece\u5927\u5230\u5c0f\u6392\u5217<\/p>\n

\r\nPS -e -o \"%C : %p : %z : %a\"|sort -k5 -nr<\/pre>\n

3\u3001\u6309 CPU \u5229\u7528\u7387\u4ece\u5927\u5230\u5c0f\u6392\u5217<\/p>\n

\r\nps -e -o \"%C : %p : %z : %a\"|sort -nr<\/pre>\n

4\u3001\u6253\u5370 cache \u91cc\u7684URL<\/p>\n

\r\ngrep -r -a jpg \/data\/cache\/* | strings | grep \"http:\" | awk -F'http:' '{print \"http:\"$2;}'<\/pre>\n

5\u3001\u67e5\u770b http \u7684\u5e76\u53d1\u8bf7\u6c42\u6570\u53ca\u5176 TCP \u8fde\u63a5\u72b6\u6001\uff1a<\/p>\n

\r\nnetstat -n | awk '\/^tcp\/ {++S[$NF]} END {for(a in S) print a, S[a]}'<\/pre>\n

6\u3001sed \u5728\u8fd9\u4e2a\u6587\u91cc Root \u7684\u4e00\u884c\uff0c\u5339\u914d Root \u4e00\u884c\uff0c\u5c06 no \u66ff\u6362\u6210 yes<\/p>\n

\r\nsed -i '\/Root\/s\/no\/yes\/' \/etc\/ssh\/sshd_config <\/pre>\n

7\u3001\u5982\u4f55\u6740\u6389 MySQL \u8fdb\u7a0b<\/p>\n

\r\nps aux |grep mysql |grep -v grep  |awk '{print $2}' |xargs kill -9<\/pre>\n

(\u4ece\u4e2d\u4e86\u89e3\u5230awk\u7684\u7528\u9014)<\/p>\n

\r\nkillall -TERM mysqld\r\n\r\nkill -9 `cat \/usr\/local\/apache2\/logs\/httpd.pid`   #\u8bd5\u8bd5\u67e5\u6740\u8fdb\u7a0bPID<\/pre>\n

8\u3001\u663e\u793a\u8fd0\u884c 3 \u7ea7\u522b\u5f00\u542f\u7684\u670d\u52a1:<\/p>\n

\r\nls \/etc\/rc3.d\/S* |cut -c 15-   (\u4ece\u4e2d\u4e86\u89e3\u5230cut\u7684\u7528\u9014\uff0c\u622a\u53d6\u6570\u636e)<\/pre>\n

9\u3001\u5982\u4f55\u5728\u7f16\u5199 SHELL \u663e\u793a\u591a\u4e2a\u4fe1\u606f\uff0c\u7528 EOF<\/p>\n

\r\ncat << EOF\r\n+--------------------------------------------------------------+\r\n|       === Welcome to Tunoff services ===                  |\r\n+--------------------------------------------------------------+\r\nEOF<\/pre>\n

10\u3001for \u7684\u5de7\u7528\uff08\u5982\u7ed9 MySQL \u5efa\u8f6f\u94fe\u63a5\uff09<\/p>\n

\r\ncd \/usr\/local\/mysql\/bin\r\nfor i in *\r\ndo ln \/usr\/local\/mysql\/bin\/$i \/usr\/bin\/$i\r\ndone<\/pre>\n

11\u3001\u53d6 IP \u5730\u5740<\/p>\n

\r\nifconfig eth0 |grep \"inet addr:\" |awk '{print $2}'| cut -c 6-  \r\n\u6216\u8005\r\n\r\nifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'<\/pre>\n

12\u3001\u5185\u5b58\u7684\u5927\u5c0f:<\/p>\n

\r\nfree -m |grep \"Mem\" | awk '{print $2}'<\/pre>\n

13\u3001web\u670d\u52a1\u5efa\u7acb\u7684\u94fe\u63a5\uff1a<\/p>\n

\r\nnetstat -an -t | grep \":80\" | grep ESTABLISHED | awk '{printf \"%s %s\\n\",$5,$6}' | sort<\/pre>\n

14\u3001\u67e5\u770b Apache \u7684\u5e76\u53d1\u8bf7\u6c42\u6570\u53ca\u5176 TCP \u8fde\u63a5\u72b6\u6001\uff1a<\/p>\n

\r\nnetstat -n | awk '\/^tcp\/ {++S[$NF]} END {for(a in S) print a, S[a]}'<\/pre>\n

15\u3001\u56e0\u4e3a\u540c\u4e8b\u8981\u7edf\u8ba1\u4e00\u4e0b\u670d\u52a1\u5668\u4e0b\u9762\u6240\u6709\u7684 jpg \u7684\u6587\u4ef6\u7684\u5927\u5c0f\uff0c\u5199\u4e86\u4e2a SHELL \u7ed9\u4ed6\u6765\u7edf\u8ba1\u3002\u539f\u6765\u7528 xargs \u5b9e\u73b0\uff0c\u4f46\u4ed6\u4e00\u6b21\u5904\u7406\u4e00\u90e8\u5206\u3002\u641e\u7684\u6709\u591a\u4e2a\u603b\u548c\u2026\u2026\uff0c\u4e0b\u9762\u7684\u547d\u4ee4\u5c31\u80fd\u89e3\u51b3\u3002<\/p>\n

\r\nfind \/ -name *.jpg -exec wc -c {} \\;|awk '{print $1}'|awk '{a+=$1}END{print a}'\r\nCPU \u7684\u6570\u91cf\uff08\u591a\u6838\u7b97\u591a\u4e2aCPU\uff0ccat \/proc\/cpuinfo |grep -c processor\uff09\u8d8a\u591a\uff0c\u7cfb\u7edf\u8d1f\u8f7d\u8d8a\u4f4e\uff0c\u6bcf\u79d2\u80fd\u5904\u7406\u7684\u8bf7\u6c42\u6570\u4e5f\u8d8a\u591a\u3002<\/pre>\n

16\u3001CPU\u8d1f\u8f7d<\/p>\n

\r\ncat \/proc\/loadavg<\/pre>\n

\u68c0\u67e5\u524d\u4e09\u4e2a\u8f93\u51fa\u503c\u662f\u5426\u8d85\u8fc7\u4e86\u7cfb\u7edf\u903b\u8f91 CPU \u76844\u500d\u3002<\/p>\n

17\u3001CPU\u8d1f\u8f7d<\/p>\n

\r\nmpstat 1 1<\/pre>\n

\u68c0\u67e5 %idle \u662f\u5426\u8fc7\u4f4e\uff08\u6bd4\u5982\u5c0f\u4e8e5%\uff09\u3002<\/p>\n

18\u3001\u5185\u5b58\u7a7a\u95f4<\/p>\n

\r\nfree\r\n\u68c0\u67e5 free \u503c\u662f\u5426\u8fc7\u4f4e\uff0c\u4e5f\u53ef\u4ee5\u7528 # cat \/proc\/meminfo<\/pre>\n

19\u3001SWAP \u7a7a\u95f4<\/p>\n

\r\nfree\r\n\u68c0\u67e5 swap used \u503c\u662f\u5426\u8fc7\u9ad8\uff0c\u5982\u679c swap used \u503c\u8fc7\u9ad8\uff0c\u8fdb\u4e00\u6b65\u68c0\u67e5 swap \u52a8\u4f5c\u662f\u5426\u9891\u7e41\uff1a\r\n\r\nvmstat 1 5\r\n\u89c2\u5bdf si \u548c so \u503c\u662f\u5426\u8f83\u5927<\/pre>\n

20\u3001\u78c1\u76d8\u7a7a\u95f4<\/p>\n

\r\ndf -h\r\n\u68c0\u67e5\u662f\u5426\u6709\u5206\u533a\u4f7f\u7528\u7387\uff08Use%\uff09\u8fc7\u9ad8\uff08\u6bd4\u5982\u8d85\u8fc790%\uff09\u5982\u53d1\u73b0\u67d0\u4e2a\u5206\u533a\u7a7a\u95f4\u63a5\u8fd1\u7528\u5c3d\uff0c\u53ef\u4ee5\u8fdb\u5165\u8be5\u5206\u533a\u7684\u6302\u8f7d\u70b9\uff0c\u7528\u4ee5\u4e0b\u547d\u4ee4\u627e\u51fa\u5360\u7528\u7a7a\u95f4\u6700\u591a\u7684\u6587\u4ef6\u6216\u76ee\u5f55\uff1a\r\n\r\ndu -cks * | sort -rn | head -n 10<\/pre>\n

21\u3001\u78c1\u76d8 I\/O \u8d1f\u8f7d<\/p>\n

\r\niostat -x 1 2<\/pre>\n

\u68c0\u67e5I\/O\u4f7f\u7528\u7387\uff08%util\uff09\u662f\u5426\u8d85\u8fc7 100%<\/p>\n

22\u3001\u7f51\u7edc\u8d1f\u8f7d<\/p>\n

\r\nsar -n DEV<\/pre>\n

\u68c0\u67e5\u7f51\u7edc\u6d41\u91cf\uff08rxbyt\/s, txbyt\/s\uff09\u662f\u5426\u8fc7\u9ad8<\/p>\n

23\u3001\u7f51\u7edc\u9519\u8bef<\/p>\n

\r\nnetstat -i<\/pre>\n

\u68c0\u67e5\u662f\u5426\u6709\u7f51\u7edc\u9519\u8bef\uff08drop fifo colls carrier\uff09\uff0c\u4e5f\u53ef\u4ee5\u7528\u547d\u4ee4\uff1a# cat \/proc\/net\/dev<\/p>\n

24\u3001\u7f51\u7edc\u8fde\u63a5\u6570\u76ee<\/p>\n

\r\nnetstat -an | grep -E \u201c^(tcp)\u201d | cut -c 68- | sort | uniq -c | sort -n<\/pre>\n

25\u3001\u8fdb\u7a0b\u603b\u6570<\/p>\n

\r\nps aux | wc -l<\/pre>\n

\u68c0\u67e5\u8fdb\u7a0b\u4e2a\u6570\u662f\u5426\u6b63\u5e38 (\u6bd4\u5982\u8d85\u8fc7250)<\/p>\n

26\u3001\u53ef\u8fd0\u884c\u8fdb\u7a0b\u6570\u76ee<\/p>\n

\r\nvmwtat 1 5<\/pre>\n

\u5217\u7ed9\u51fa\u7684\u662f\u53ef\u8fd0\u884c\u8fdb\u7a0b\u7684\u6570\u76ee\uff0c\u68c0\u67e5\u5176\u662f\u5426\u8d85\u8fc7\u7cfb\u7edf\u903b\u8f91 CPU \u7684 4 \u500d<\/p>\n

27\u3001\u8fdb\u7a0b<\/p>\n

\r\ntop -id 1<\/pre>\n

\u89c2\u5bdf\u662f\u5426\u6709\u5f02\u5e38\u8fdb\u7a0b\u51fa\u73b0\u3002<\/p>\n

28\u3001\u7f51\u7edc\u72b6\u6001\uff0c\u68c0\u67e5DNS\uff0c\u7f51\u5173\u7b49\u662f\u5426\u53ef\u4ee5\u6b63\u5e38\u8fde\u901a<\/p>\n

\r\nping traceroute nslookup dig <\/pre>\n

29\u3001\u7528\u6237<\/p>\n

\r\nwho | wc -l<\/pre>\n

\u68c0\u67e5\u767b\u5f55\u7528\u6237\u662f\u5426\u8fc7\u591a (\u6bd4\u5982\u8d85\u8fc750\u4e2a) \u4e5f\u53ef\u4ee5\u7528\u547d\u4ee4\uff1a# uptime\u3002<\/p>\n

30\u3001\u7cfb\u7edf\u65e5\u5fd7<\/p>\n

\r\n# cat \/var\/log\/rflogview\/*errors\r\n\u68c0\u67e5\u662f\u5426\u6709\u5f02\u5e38\u9519\u8bef\u8bb0\u5f55   \u4e5f\u53ef\u4ee5\u641c\u5bfb\u4e00\u4e9b\u5f02\u5e38\u5173\u952e\u5b57\uff0c\u4f8b\u5982\uff1a\r\n\r\ngrep -i error \/var\/log\/messages\r\ngrep -i fail \/var\/log\/messages<\/pre>\n

31\u3001\u6838\u5fc3\u65e5\u5fd7<\/p>\n

\r\ndmesg<\/pre>\n

\u68c0\u67e5\u662f\u5426\u6709\u5f02\u5e38\u9519\u8bef\u8bb0\u5f55\u3002<\/p>\n

32\u3001\u7cfb\u7edf\u65f6\u95f4<\/p>\n

\r\ndate<\/pre>\n

\u68c0\u67e5\u7cfb\u7edf\u65f6\u95f4\u662f\u5426\u6b63\u786e\u3002<\/p>\n

33\u3001\u6253\u5f00\u6587\u4ef6\u6570\u76ee<\/p>\n

\r\nlsof | wc -l<\/pre>\n

\u68c0\u67e5\u6253\u5f00\u6587\u4ef6\u603b\u6570\u662f\u5426\u8fc7\u591a\u3002<\/p>\n

34\u3001\u65e5\u5fd7<\/p>\n

\r\n# logwatch \u2013print\r\n\u914d\u7f6e \/etc\/log.d\/logwatch.conf\uff0c\u5c06 Mailto \u8bbe\u7f6e\u4e3a\u81ea\u5df1\u7684 email \u5730\u5740\uff0c\u542f\u52a8 mail \u670d\u52a1(sendmail\u6216\u8005postfix)\uff0c\u8fd9\u6837\u5c31\u53ef\u4ee5\u6bcf\u5929\u6536\u5230\u65e5\u5fd7\u62a5\u544a\u4e86\u3002\r\n\u7f3a\u7701 logwatch \u53ea\u62a5\u544a\u6628\u5929\u7684\u65e5\u5fd7\uff0c\u53ef\u4ee5\u7528 # logwatch \u2013print \u2013range all \u83b7\u5f97\u6240\u6709\u7684\u65e5\u5fd7\u5206\u6790\u7ed3\u679c\u3002\r\n\u53ef\u4ee5\u7528 # logwatch \u2013print \u2013detail high \u83b7\u5f97\u66f4\u5177\u4f53\u7684\u65e5\u5fd7\u5206\u6790\u7ed3\u679c(\u800c\u4e0d\u4ec5\u4ec5\u662f\u51fa\u9519\u65e5\u5fd7)\u3002\r\n<\/pre>\n

35\u3001\u6740\u638980\u7aef\u53e3\u76f8\u5173\u7684\u8fdb\u7a0b<\/p>\n

\r\nlsof -i :80|grep -v \u201cID\u201d|awk \u2018{print \u201ckill -9\u201d,$2}\u2019|sh<\/pre>\n

36\u3001\u6e05\u9664\u50f5\u6b7b\u8fdb\u7a0b<\/p>\n

\r\nps -eal | awk '{ if ($2 == \"Z\") {print $4}}' | kill -9<\/pre>\n

37\u3001tcpdump \u6293\u5305\uff0c\u7528\u6765\u9632\u6b6280\u7aef\u53e3\u88ab\u4eba\u653b\u51fb\u65f6\u53ef\u4ee5\u5206\u6790\u6570\u636e<\/p>\n

\r\ntcpdump -c 10000 -i eth0 -n dst port 80 > \/root\/pkts<\/pre>\n

38\u3001\u7136\u540e\u68c0\u67e5IP\u7684\u91cd\u590d\u6570\u5e76\u4ece\u5c0f\u5230\u5927\u6392\u5e8f \u6ce8\u610f \u201c-t\\ +0\u201d \u4e2d\u95f4\u662f\u4e24\u4e2a\u7a7a\u683c<\/p>\n

\r\n# less pkts | awk {'printf $3\"\\n\"'} | cut -d. -f 1-4 | sort | uniq -c | awk {'printf $1\" \"$2\"\\n\"'} | sort -n -t\\ +0<\/pre>\n

39\u3001\u67e5\u770b\u6709\u591a\u5c11\u4e2a\u6d3b\u52a8\u7684 php-cgi \u8fdb\u7a0b<\/p>\n

\r\nnetstat -anp | grep php-cgi | grep ^tcp | wc -l<\/pre>\n

40\u3001\u67e5\u770b\u7cfb\u7edf\u81ea\u542f\u52a8\u7684\u670d\u52a1<\/p>\n

\r\nchkconfig --list | awk '{if ($5==\"3:on\") print $1}'<\/pre>\n

41\u3001kudzu \u67e5\u770b\u7f51\u5361\u578b\u53f7<\/p>\n

\r\nkudzu --probe --class=network<\/pre>\n
\u5e38\u7528\u6b63\u5219\u8868\u8fbe\u5f0f<\/strong><\/div>\n

1.\u5339\u914d\u4e2d\u6587\u5b57\u7b26\u7684\u6b63\u5219\u8868\u8fbe\u5f0f\uff1a[\\u4e00-\\u9fa5]<\/code><\/p>\n

\u8bc4\u6ce8\uff1a\u5339\u914d\u4e2d\u6587\u8fd8\u771f\u662f\u4e2a\u5934\u75bc\u7684\u4e8b\uff0c\u6709\u4e86\u8fd9\u4e2a\u8868\u8fbe\u5f0f\u5c31\u597d\u529e\u4e86<\/p>\n

2.\u5339\u914d\u53cc\u5b57\u8282\u5b57\u7b26(\u5305\u62ec\u6c49\u5b57\u5728\u5185)\uff1a[^\\x00-\\xff]<\/code><\/p>\n

\u8bc4\u6ce8\uff1a\u53ef\u4ee5\u7528\u6765\u8ba1\u7b97\u5b57\u7b26\u4e32\u7684\u957f\u5ea6\uff08\u4e00\u4e2a\u53cc\u5b57\u8282\u5b57\u7b26\u957f\u5ea6\u8ba12\uff0cASCII\u5b57\u7b26\u8ba11\uff09<\/p>\n

3.\u5339\u914d\u7a7a\u767d\u884c\u7684\u6b63\u5219\u8868\u8fbe\u5f0f\uff1a\\n\\s*\\r<\/code><\/p>\n

\u8bc4\u6ce8\uff1a\u53ef\u4ee5\u7528\u6765\u5220\u9664\u7a7a\u767d\u884c<\/p>\n

4.\u5339\u914d HTML \u6807\u8bb0\u7684\u6b63\u5219\u8868\u8fbe\u5f0f\uff1a<(\\S*?)[^>]*>.*?<\/\\1>|<.*? \/><\/code><\/p>\n

\u8bc4\u6ce8\uff1a\u7f51\u4e0a\u6d41\u4f20\u7684\u7248\u672c\u592a\u7cdf\u7cd5\uff0c\u4e0a\u9762\u8fd9\u4e2a\u4e5f\u4ec5\u4ec5\u80fd\u5339\u914d\u90e8\u5206\uff0c\u5bf9\u4e8e\u590d\u6742\u7684\u5d4c\u5957\u6807\u8bb0\u4f9d\u65e7\u65e0\u80fd\u4e3a\u529b<\/p>\n

5.\u5339\u914d\u9996\u5c3e\u7a7a\u767d\u5b57\u7b26\u7684\u6b63\u5219\u8868\u8fbe\u5f0f\uff1a^\\s*|\\s*$<\/code><\/p>\n

\u8bc4\u6ce8\uff1a\u53ef\u4ee5\u7528\u6765\u5220\u9664\u884c\u9996\u884c\u5c3e\u7684\u7a7a\u767d\u5b57\u7b26(\u5305\u62ec\u7a7a\u683c\u3001\u5236\u8868\u7b26\u3001\u6362\u9875\u7b26\u7b49\u7b49)\uff0c\u975e\u5e38\u6709\u7528\u7684\u8868\u8fbe\u5f0f<\/p>\n

6.\u5339\u914dEmail\u5730\u5740\u7684\u6b63\u5219\u8868\u8fbe\u5f0f\uff1a<\/p>\n

\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*<\/code>
\n\u8bc4\u6ce8\uff1a\u8868\u5355\u9a8c\u8bc1\u65f6\u5f88\u5b9e\u7528<\/p>\n

7.\u5339\u914d\u7f51\u5740URL\u7684\u6b63\u5219\u8868\u8fbe\u5f0f\uff1a[a-zA-z]+:\/\/[^\\s]*<\/code><\/p>\n

\u8bc4\u6ce8\uff1a\u7f51\u4e0a\u6d41\u4f20\u7684\u7248\u672c\u529f\u80fd\u5f88\u6709\u9650\uff0c\u4e0a\u9762\u8fd9\u4e2a\u57fa\u672c\u53ef\u4ee5\u6ee1\u8db3\u9700\u6c42<\/p>\n

8.\u5339\u914d\u5e10\u53f7\u662f\u5426\u5408\u6cd5(\u5b57\u6bcd\u5f00\u5934\uff0c\u5141\u8bb85-16\u5b57\u8282\uff0c\u5141\u8bb8\u5b57\u6bcd\u6570\u5b57\u4e0b\u5212\u7ebf)\uff1a^[a-zA-Z][a-zA-Z0-9_]{4,15}$<\/code><\/p>\n

\u8bc4\u6ce8\uff1a\u8868\u5355\u9a8c\u8bc1\u65f6\u5f88\u5b9e\u7528<\/p>\n

9.\u5339\u914d\u56fd\u5185\u7535\u8bdd\u53f7\u7801\uff1a\\d{3}-\\d{8}|\\d{4}-\\d{7}<\/code><\/p>\n

\u8bc4\u6ce8\uff1a\u5339\u914d\u5f62\u5f0f\u5982 0511-4405222 \u6216 021-87888822<\/code><\/p>\n

10.\u5339\u914d\u817e\u8bafQQ\u53f7\uff1a[1-9][0-9]{4,}<\/code><\/p>\n

\u8bc4\u6ce8\uff1a\u817e\u8bafQQ\u53f7\u4ece10000\u5f00\u59cb<\/p>\n

11.\u5339\u914d\u4e2d\u56fd\u90ae\u653f\u7f16\u7801\uff1a[1-9]\\d{5}(?!\\d)<\/code><\/p>\n

\u8bc4\u6ce8\uff1a\u4e2d\u56fd\u90ae\u653f\u7f16\u7801\u4e3a6\u4f4d\u6570\u5b57<\/p>\n

12.\u5339\u914d\u00d7\u00d7\u00d7\uff1a\\d{15}|\\d{18}<\/code><\/p>\n

\u8bc4\u6ce8\uff1a\u4e2d\u56fd\u7684\u00d7\u00d7\u00d7\u4e3a15\u4f4d\u621618\u4f4d<\/p>\n

13.\u5339\u914dip\u5730\u5740\uff1a\\d+\\.\\d+\\.\\d+\\.\\d+<\/code><\/p>\n

\u8bc4\u6ce8\uff1a\u63d0\u53d6 IP \u5730\u5740\u65f6\u6709\u7528<\/p>\n

14.\u5339\u914d\u7279\u5b9a\u6570\u5b57\uff1a<\/p>\n

\r\n^[1-9]\\d*$   \/\/\u5339\u914d\u6b63\u6574\u6570\r\n^-[1-9]\\d*$  \/\/\u5339\u914d\u8d1f\u6574\u6570\r\n^-?[1-9]\\d*$  \/\/\u5339\u914d\u6574\u6570\r\n^[1-9]\\d*|0$ \/\/\u5339\u914d\u975e\u8d1f\u6574\u6570\uff08\u6b63\u6574\u6570 + 0\uff09\r\n^-[1-9]\\d*|0$  \/\/\u5339\u914d\u975e\u6b63\u6574\u6570\uff08\u8d1f\u6574\u6570 + 0\uff09\r\n^[1-9]\\d*\\.\\d*|0\\.\\d*[1-9]\\d*$  \/\/\u5339\u914d\u6b63\u6d6e\u70b9\u6570\r\n^-([1-9]\\d*\\.\\d*|0\\.\\d*[1-9]\\d*)$ \/\/\u5339\u914d\u8d1f\u6d6e\u70b9\u6570\r\n^-?([1-9]\\d*\\.\\d*|0\\.\\d*[1-9]\\d*|0?\\.0+|0)$ \/\/\u5339\u914d\u6d6e\u70b9\u6570\r\n^[1-9]\\d*\\.\\d*|0\\.\\d*[1-9]\\d*|0?\\.0+|0$  \/\/\u5339\u914d\u975e\u8d1f\u6d6e\u70b9\u6570\uff08\u6b63\u6d6e\u70b9\u6570 + 0\uff09\r\n^(-([1-9]\\d*\\.\\d*|0\\.\\d*[1-9]\\d*))|0?\\.0+|0$ \/\/\u5339\u914d\u975e\u6b63\u6d6e\u70b9\u6570\uff08\u8d1f\u6d6e\u70b9\u6570 + 0\uff09<\/pre>\n

\u8bc4\u6ce8\uff1a\u5904\u7406\u5927\u91cf\u6570\u636e\u65f6\u6709\u7528\uff0c\u5177\u4f53\u5e94\u7528\u65f6\u6ce8\u610f\u4fee\u6b63<\/p>\n

15.\u5339\u914d\u7279\u5b9a\u5b57\u7b26\u4e32\uff1a<\/p>\n

\r\n^[A-Za-z]+$ \/\/\u5339\u914d\u753126\u4e2a\u82f1\u6587\u5b57\u6bcd\u7ec4\u6210\u7684\u5b57\u7b26\u4e32\r\n^[A-Z]+$ \/\/\u5339\u914d\u753126\u4e2a\u82f1\u6587\u5b57\u6bcd\u7684\u5927\u5199\u7ec4\u6210\u7684\u5b57\u7b26\u4e32\r\n^[a-z]+$ \/\/\u5339\u914d\u753126\u4e2a\u82f1\u6587\u5b57\u6bcd\u7684\u5c0f\u5199\u7ec4\u6210\u7684\u5b57\u7b26\u4e32\r\n^[A-Za-z0-9]+$ \/\/\u5339\u914d\u7531\u6570\u5b57\u548c26\u4e2a\u82f1\u6587\u5b57\u6bcd\u7ec4\u6210\u7684\u5b57\u7b26\u4e32\r\n^\\w+$ \/\/\u5339\u914d\u7531\u6570\u5b57\u300126\u4e2a\u82f1\u6587\u5b57\u6bcd\u6216\u8005\u4e0b\u5212\u7ebf\u7ec4\u6210\u7684\u5b57\u7b26\u4e32<\/pre>\n

\u8bc4\u6ce8\uff1a\u6700\u57fa\u672c\u4e5f\u662f\u6700\u5e38\u7528\u7684\u4e00\u4e9b\u8868\u8fbe\u5f0f<\/p>\n","protected":false},"excerpt":{"rendered":"

1\u3001\u5220\u96640\u5b57\u8282\u6587\u4ef6 find -type f -size 0 -exec rm -rf {} \\; 2\u3001\u67e5\u770b\u8fdb […]<\/p>\n","protected":false},"author":1469,"featured_media":205064,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-205062","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/205062","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1469"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=205062"}],"version-history":[{"count":8,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/205062\/revisions"}],"predecessor-version":[{"id":205296,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/205062\/revisions\/205296"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/205064"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=205062"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=205062"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=205062"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}