{"id":428,"date":"2007-06-10T10:25:09","date_gmt":"2007-06-10T02:25:09","guid":{"rendered":"http:\/\/blog.axqd.net\/?p=428"},"modified":"2007-06-10T10:25:09","modified_gmt":"2007-06-10T02:25:09","slug":"debian-common-commands","status":"publish","type":"post","link":"https:\/\/blog.axqd.net\/?p=428","title":{"rendered":"Debian\u5e38\u7528\u547d\u4ee4"},"content":{"rendered":"<p>\u67e5\u770b\u8f6f\u4ef6xxx\u5b89\u88c5\u5185\u5bb9<br \/>\n<code>dpkg -L xxx<\/code><\/p>\n<p>\u67e5\u627e\u8f6f\u4ef6<br \/>\n<code>apt-cache search \u6b63\u5219\u8868\u8fbe\u5f0f<\/code><\/p>\n<p>\u67e5\u627e\u6587\u4ef6\u5c5e\u4e8e\u54ea\u4e2a\u5305<br \/>\n<code>dpkg -S filename<br \/>\napt-file search filename<\/code><\/p>\n<p>\u67e5\u8be2\u8f6f\u4ef6xxx\u4f9d\u8d56\u54ea\u4e9b\u5305<br \/>\n<code>apt-cache depends xxx<\/code><\/p>\n<p>\u67e5\u8be2\u8f6f\u4ef6xxx\u88ab\u54ea\u4e9b\u5305\u4f9d\u8d56<br \/>\n<code>apt-cache rdepends xxx<\/code><\/p>\n<p>\u589e\u52a0\u4e00\u4e2a\u5149\u76d8\u6e90<br \/>\n<code>apt-cdrom add<\/code><\/p>\n<p>\u7cfb\u7edf\u5347\u7ea7<br \/>\n<code>apt-get update<br \/>\napt-get upgrade<br \/>\napt-get dist-upgrade<\/code><\/p>\n<p>\u6e05\u9664\u6240\u6709\u5220\u9664\u5305\u7684\u6b8b\u4f59\u914d\u7f6e\u6587\u4ef6<br \/>\n<code>dpkg -l |grep ^rc|awk ''{print $2}'' |tr [\"n\"] [\" \"]|sudo xargs dpkg -P -<\/code><\/p>\n<p>\u7f16\u8bd1\u65f6\u7f3a\u5c11h\u6587\u4ef6\u7684\u81ea\u52a8\u5904\u7406<br \/>\n<code>auto-apt run .\/configure<\/code><\/p>\n<p>\u67e5\u770b\u5b89\u88c5\u8f6f\u4ef6\u65f6\u4e0b\u8f7d\u5305\u7684\u4e34\u65f6\u5b58\u653e\u76ee\u5f55<br \/>\n<code>ls \/var\/cache\/apt\/archives<\/code><\/p>\n<p>\u5907\u4efd\u5f53\u524d\u7cfb\u7edf\u5b89\u88c5\u7684\u6240\u6709\u5305\u7684\u5217\u8868<br \/>\n<code>dpkg --get-selections | grep -v deinstall > ~\/somefile<\/code><\/p>\n<p>\u4ece\u4e0a\u9762\u5907\u4efd\u7684\u5b89\u88c5\u5305\u7684\u5217\u8868\u6587\u4ef6\u6062\u590d\u6240\u6709\u5305<br \/>\n<code>dpkg --set-selections < ~\/somefile\ndselect<\/code><\/p>\n<p>\u6e05\u7406\u65e7\u7248\u672c\u7684\u8f6f\u4ef6\u7f13\u5b58<br \/>\n<code>apt-get autoclean<\/code><\/p>\n<p>\u6e05\u7406\u6240\u6709\u8f6f\u4ef6\u7f13\u5b58<br \/>\n<code>apt-get clean<\/code><\/p>\n<p>\u5220\u9664\u7cfb\u7edf\u4e0d\u518d\u4f7f\u7528\u7684\u5b64\u7acb\u8f6f\u4ef6<br \/>\n<code>apt-get autoremove<\/code><\/p>\n<p>\u67e5\u770b\u5305\u5728\u670d\u52a1\u5668\u4e0a\u9762\u7684\u5730\u5740<br \/>\n<code>apt-get -qq --print-uris install ssh | cut -d'' -f2<\/code><\/p>\n<p>\u67e5\u770b\u5185\u6838<br \/>\n<code>uname -a<\/code><\/p>\n<p>\u67e5\u770bUbuntu\u7248\u672c<br \/>\n<code>cat \/etc\/issue<\/code><\/p>\n<p>\u67e5\u770b\u5185\u6838\u52a0\u8f7d\u7684\u6a21\u5757<br \/>\n<code>lsmod<\/code><\/p>\n<p>\u67e5\u770bPCI\u8bbe\u5907<br \/>\n<code>lspci<\/code><\/p>\n<p>\u67e5\u770bUSB\u8bbe\u5907<br \/>\n<code>lsusb<\/code><\/p>\n<p>\u67e5\u770b\u7f51\u5361\u72b6\u6001<br \/>\n<code>ethtool eth0<\/code><\/p>\n<p>\u67e5\u770bCPU\u4fe1\u606f<br \/>\n<code>cat \/proc\/cpuinfo<\/code><\/p>\n<p>\u663e\u793a\u5f53\u524d\u786c\u4ef6\u4fe1\u606f<br \/>\n<code>lshw<\/code><\/p>\n<p>\u67e5\u770b\u786c\u76d8\u7684\u5206\u533a<br \/>\n<code>fdisk -l<\/code><\/p>\n<p>\u67e5\u770bIDE\u786c\u76d8\u4fe1\u606f<br \/>\n<code>hdparm -i \/dev\/hda<\/code><\/p>\n<p>\u67e5\u770bSTAT\u786c\u76d8\u4fe1\u606f<br \/>\n<code>hdparm -I \/dev\/sda<br \/>\n\u6216<br \/>\napt-get install blktool<br \/>\nblktool \/dev\/sda id<\/code><\/p>\n<p>\u67e5\u770b\u786c\u76d8\u5269\u4f59\u7a7a\u95f4<br \/>\n<code>df -h<br \/>\ndf -H<\/code><\/p>\n<p>\u67e5\u770b\u76ee\u5f55\u5360\u7528\u7a7a\u95f4<br \/>\n<code>du -hs \u76ee\u5f55\u540d<\/code><\/p>\n<p>\u4f18\u76d8\u6ca1\u6cd5\u5378\u8f7d<br \/>\n<code>sync<br \/>\nfuser -km \/media\/usbdisk<\/code><\/p>\n<p>\u67e5\u770b\u5f53\u524d\u7684\u5185\u5b58\u4f7f\u7528\u60c5\u51b5<br \/>\n<code>free -m<\/code><\/p>\n<p>\u67e5\u770b\u5f53\u524d\u6709\u54ea\u4e9b\u8fdb\u7a0b<br \/>\n<code>ps -aux<\/code><\/p>\n<p>\u4e2d\u6b62\u4e00\u4e2a\u8fdb\u7a0b<br \/>\n<code>kill \u8fdb\u7a0b\u53f7<br \/>\n\u6216 killall \u8fdb\u7a0b\u540d<\/code><\/p>\n<p>\u5f3a\u5236\u4e2d\u6b62\u4e00\u4e2a\u8fdb\u7a0b<br \/>\n<code>kill -9 \u8fdb\u7a0b\u53f7<br \/>\n\u6216 killall -9 \u8fdb\u7a0b\u540d<\/code><\/p>\n<p>\u67e5\u770b\u5f53\u524d\u8fdb\u7a0b\u7684\u5b9e\u65f6\u72b6\u51b5<br \/>\n<code>top<\/code><\/p>\n<p>\u67e5\u770b\u8fdb\u7a0b\u6253\u5f00\u7684\u6587\u4ef6<br \/>\n<code>lsof -p<\/code><\/p>\n<p>\u914d\u7f6e ADSL<br \/>\n<code>pppoeconf<\/code><\/p>\n<p>ADSL\u624b\u5de5\u62e8\u53f7<br \/>\n<code>pon dsl-provider<\/code><\/p>\n<p>\u6fc0\u6d3b ADSL<br \/>\n<code>\/etc\/ppp\/pppoe_on_boot<\/code><\/p>\n<p>\u65ad\u5f00 ADSL<br \/>\n<code>poff<\/code><\/p>\n<p>\u67e5\u770b\u62e8\u53f7\u65e5\u5fd7<br \/>\n<code>plog<\/code><\/p>\n<p>\u6839\u636eIP\u67e5\u7f51\u5361\u5730\u5740<br \/>\n<code>arping IP\u5730\u5740<\/code><\/p>\n<p>\u67e5\u770b\u5f53\u524dIP\u5730\u5740<br \/>\n<code>ifconfig eth0<\/code><\/p>\n<p>\u67e5\u770b\u5f53\u524d\u76d1\u542c80\u7aef\u53e3\u7684\u7a0b\u5e8f<br \/>\n<code>lsof -i :80<\/code><\/p>\n<p>\u67e5\u770b\u5f53\u524d\u7f51\u5361\u7684\u7269\u7406\u5730\u5740<br \/>\n<code>arp -a | awk ''{print $4}''<br \/>\nifconfig eth0 | head -1 | awk ''{print $5}''<\/code><\/p>\n<p>\u7acb\u5373\u8ba9\u7f51\u7edc\u652f\u6301nat<br \/>\n<code>echo 1 > \/proc\/sys\/net\/ipv4\/ip_forward<br \/>\niptables -t nat -I POSTROUTING -j MASQUERADE<\/code><\/p>\n<p>\u67e5\u770b\u8def\u7531\u4fe1\u606f<br \/>\n<code>netstat -rn<br \/>\nroute -n<\/code><\/p>\n<p>\u624b\u5de5\u589e\u52a0\u5220\u9664\u4e00\u6761\u8def\u7531<br \/>\n<code>route add -net 192.168.0.0 netmask 255.255.255.0 gw 172.16.0.1<br \/>\nroute del -net 192.168.0.0 netmask 255.255.255.0 gw 172.16.0.1<\/code><\/p>\n<p>\u4fee\u6539\u7f51\u5361MAC\u5730\u5740\u7684\u65b9\u6cd5<br \/>\n<code>ifconfig eth0 down #\u5173\u95ed\u7f51\u5361<br \/>\nifconfig eth0 hw ether 00:AA:BB:CC:DD:EE #\u7136\u540e\u6539\u5730\u5740<br \/>\nifconfig eth0 up #\u7136\u540e\u542f\u52a8\u7f51\u5361<\/code><\/p>\n<p>\u7edf\u8ba1\u5f53\u524dIP\u8fde\u63a5\u7684\u4e2a\u6570<br \/>\n<code>netstat -na|grep ESTABLISHED|awk ''{print $5}''|awk -F: ''{print $1}''|sort|uniq -c|sort -r -n<br \/>\nnetstat -na|grep SYN|awk ''{print $5}''|awk -F: ''{print $1}''|sort|uniq -c|sort -r -n<\/code><\/p>\n<p>\u7edf\u8ba1\u5f53\u524d20000\u4e2aIP\u5305\u4e2d\u5927\u4e8e100\u4e2aIP\u5305\u7684IP\u5730\u5740<br \/>\n<code>tcpdump -tnn -c 20000 -i eth0 | awk -F \".\" ''{print $1\".\"$2\".\"$3\".\"$4}'' | sort | uniq -c | sort -nr | awk '' $1 > 100 ''<\/code><\/p>\n<p>\u5c4f\u853dIPV6<br \/>\n<code>echo \"blacklist ipv6\" | tee \/etc\/modprobe.d\/blacklist-ipv6<\/code><\/p>\n<p>\u6dfb\u52a0\u4e00\u4e2a\u670d\u52a1<br \/>\n<code>update-rc.d \u670d\u52a1\u540d defaults 99<\/code><\/p>\n<p>\u5220\u9664\u4e00\u4e2a\u670d\u52a1<br \/>\n<code>update-rc.d \u670d\u52a1\u540d remove<\/code><\/p>\n<p>\u4e34\u65f6\u91cd\u542f\u4e00\u4e2a\u670d\u52a1<br \/>\n<code>\/etc\/init.d\/\u670d\u52a1\u540d restart<\/code><\/p>\n<p>\u4e34\u65f6\u5173\u95ed\u4e00\u4e2a\u670d\u52a1<br \/>\n<code>\/etc\/init.d\/\u670d\u52a1\u540d stop<\/code><\/p>\n<p>\u4e34\u65f6\u542f\u52a8\u4e00\u4e2a\u670d\u52a1<br \/>\n<code>\/etc\/init.d\/\u670d\u52a1\u540d start<\/code><\/p>\n<p>\u914d\u7f6e\u9ed8\u8ba4Java\u4f7f\u7528\u54ea\u4e2a<br \/>\n<code>update-alternatives --config java<\/code><\/p>\n<p>\u4fee\u6539\u7528\u6237\u8d44\u6599<br \/>\n<code>chfn userid<\/code><\/p>\n<p>\u7ed9apt\u8bbe\u7f6e\u4ee3\u7406<br \/>\n<code>export http_proxy=http:\/\/xx.xx.xx.xx:xxx<\/code><\/p>\n<p>\u4fee\u6539\u7cfb\u7edf\u767b\u5f55\u4fe1\u606f<br \/>\n<code>vi \/etc\/motd<\/code><\/p>\n<p>\u8f6c\u6362\u6587\u4ef6\u540d\u7531GBK\u4e3aUTF8<br \/>\n<code>apt-get install convmv<br \/>\nconvmv -r -f cp936 -t utf8 --notest --nosmart *<\/code><\/p>\n<p>\u6279\u91cf\u8f6c\u6362src\u76ee\u5f55\u4e0b\u7684\u6240\u6709\u6587\u4ef6\u5185\u5bb9\u7531GBK\u5230UTF8<br \/>\n<code>find src -type d -exec mkdir -p utf8\/{} ;<br \/>\nfind src -type f -exec iconv -f GBK -t UTF-8 {} -o utf8\/{} ;<br \/>\nmv utf8\/* src<br \/>\nrm -fr utf8<\/code><\/p>\n<p>\u8f6c\u6362\u6587\u4ef6\u5185\u5bb9\u7531GBK\u5230UTF8<br \/>\n<code>iconv -f gbk -t utf8 $i > newfile<\/code><\/p>\n<p>\u8f6c\u6362 mp3 \u6807\u7b7e\u7f16\u7801<br \/>\n<code>apt-get install python-mutagen<br \/>\nfind . -iname \u201c*.mp3\u201d -execdir mid3iconv -e GBK {} ;<\/code><\/p>\n<p>\u63a7\u5236\u53f0\u4e0b\u663e\u793a\u4e2d\u6587<br \/>\n<code>apt-get install zhcon<br \/>\n\u4f7f\u7528\u65f6\uff0c\u8f93\u5165zhcon\u5373\u53ef<\/code><\/p>\n<p>\u5feb\u901f\u67e5\u627e\u67d0\u4e2a\u6587\u4ef6<br \/>\n<code>whereis filename<br \/>\nfind \u76ee\u5f55 -name \u6587\u4ef6\u540d<\/code><\/p>\n<p>\u67e5\u770b\u6587\u4ef6\u7c7b\u578b<br \/>\n<code>file filename<\/code><\/p>\n<p>\u663e\u793axxx\u6587\u4ef6\u5012\u65706\u884c\u7684\u5185\u5bb9<br \/>\n<code>tail -n 6 xxx<\/code><\/p>\n<p>\u8ba9tail\u4e0d\u505c\u5730\u8bfb\u5730\u6700\u65b0\u7684\u5185\u5bb9<br \/>\n<code>tail -n 10 -f \/var\/log\/apache2\/access.log<\/code><\/p>\n<p>\u67e5\u770b\u6587\u4ef6\u4e2d\u95f4\u7684\u7b2c\u4e94\u884c ( \u542b ) \u5230\u7b2c 10 \u884c ( \u542b ) \u7684\u5185\u5bb9<br \/>\n<code>sed -n ''5,10p'' \/var\/log\/apache2\/access.log<\/code><\/p>\n<p>\u67e5\u627e\u5305\u542bxxx\u5b57\u7b26\u4e32\u7684\u6587\u4ef6<br \/>\n<code>grep -l -r xxx .<\/code><\/p>\n<p>\u67e5\u627e\u5173\u4e8exxx\u7684\u547d\u4ee4<br \/>\n<code>apropos xxx<br \/>\nman -k xxx<\/code><\/p>\n<p>\u901a\u8fc7ssh\u4f20\u8f93\u6587\u4ef6<br \/>\n<code>scp -rp \/path\/filename username@remoteIP:\/path  #\u5c06\u672c\u5730\u6587\u4ef6\u62f7\u8d1d\u5230\u670d\u52a1\u5668\u4e0a<br \/>\nscp -rp username@remoteIP:\/path\/filename \/path  #\u5c06\u8fdc\u7a0b\u6587\u4ef6\u4ece\u670d\u52a1\u5668\u4e0b\u8f7d\u5230\u672c\u5730<\/code><\/p>\n<p>\u67e5\u770b\u67d0\u4e2a\u6587\u4ef6\u88ab\u54ea\u4e9b\u5e94\u7528\u7a0b\u5e8f\u8bfb\u5199<br \/>\n<code>lsof \u6587\u4ef6\u540d<\/code><\/p>\n<p>\u628a\u6240\u6709\u6587\u4ef6\u7684\u540e\u8f8d\u7531rm\u6539\u4e3armvb<br \/>\n<code>rename ''s\/.rm$\/.rmvb\/'' *<\/code><\/p>\n<p>\u628a\u6240\u6709\u6587\u4ef6\u540d\u4e2d\u7684\u5927\u5199\u6539\u4e3a\u5c0f\u5199<br \/>\n<code>rename ''tr\/A-Z\/a-z\/'' *<\/code><\/p>\n<p>\u5220\u9664\u7279\u6b8a\u6587\u4ef6\u540d\u7684\u6587\u4ef6\uff0c\u5982\u6587\u4ef6\u540d\uff1a--help.txt<br \/>\n<code>rm -- --help.txt \u6216\u8005 rm .\/--help.txt<\/code><\/p>\n<p>\u67e5\u770b\u5f53\u524d\u76ee\u5f55\u7684\u5b50\u76ee\u5f55<br \/>\n<code>ls -d *\/. \u6216 echo *\/.<\/code><\/p>\n<p>\u5c06\u5f53\u524d\u76ee\u5f55\u4e0b\u6700\u8fd130\u5929\u8bbf\u95ee\u8fc7\u7684\u6587\u4ef6\u79fb\u52a8\u5230\u4e0a\u7ea7back\u76ee\u5f55<br \/>\n<code>find . -type f -atime -30 -exec mv {} ..\/back ;<\/code><\/p>\n<p>\u5c06\u5f53\u524d\u76ee\u5f55\u4e0b\u6700\u8fd12\u5c0f\u65f6\u52308\u5c0f\u65f6\u4e4b\u5185\u7684\u6587\u4ef6\u663e\u793a\u51fa\u6765<br \/>\n<code>find . -mmin +120 -mmin -480 -exec more {} ;<\/code><\/p>\n<p>\u5220\u9664\u4fee\u6539\u65f6\u95f4\u572830\u5929\u4e4b\u524d\u7684\u6240\u6709\u6587\u4ef6<br \/>\n<code>find . -type f -mtime +30 -mtime -3600 -exec rm {} ;<\/code><\/p>\n<p>\u67e5\u627eguest\u7528\u6237\u7684\u4ee5avi\u6216\u8005rm\u7ed3\u5c3e\u7684\u6587\u4ef6\u5e76\u5220\u9664\u6389<br \/>\n<code>find . -name ''*.avi'' -o -name ''*.rm'' -user ''guest'' -exec rm {} ;<\/code><\/p>\n<p>\u67e5\u627e\u7684\u4e0d\u4ee5java\u548cxml\u7ed3\u5c3e,\u5e767\u5929\u6ca1\u6709\u4f7f\u7528\u7684\u6587\u4ef6\u5220\u9664\u6389<br \/>\n<code>find . ! -name *.java ! -name \u2018*.xml\u2019 -atime +7 -exec rm {} ;<\/code><\/p>\n<p>\u7edf\u8ba1\u5f53\u524d\u6587\u4ef6\u4e2a\u6570<br \/>\n<code>ls \/usr\/bin|wc -w<\/code><\/p>\n<p>\u7edf\u8ba1\u5f53\u524d\u76ee\u5f55\u4e2a\u6570<br \/>\n<code>ls -l \/usr\/bin|grep ^d|wc -l<\/code><\/p>\n<p>\u663e\u793a\u5f53\u524d\u76ee\u5f55\u4e0b2006-01-01\u7684\u6587\u4ef6\u540d<br \/>\n<code>ls -l |grep 2006-01-01 |awk ''{print $8}''<\/code><\/p>\n<p>\u89e3\u538b\u7f29 xxx.tar.gz<br \/>\n<code>tar -zxvf xxx.tar.gz<\/code><\/p>\n<p>\u89e3\u538b\u7f29 xxx.tar.bz2<br \/>\n<code>tar -jxvf xxx.tar.bz2<\/code><\/p>\n<p>\u538b\u7f29aaa bbb\u76ee\u5f55\u4e3axxx.tar.gz<br \/>\n<code>tar -zcvf xxx.tar.gz aaa bbb<\/code><\/p>\n<p>\u538b\u7f29aaa bbb\u76ee\u5f55\u4e3axxx.tar.bz2<br \/>\n<code>tar -jcvf xxx.tar.bz2 aaa bbb<\/code><\/p>\n<p>\u7279\u6b8a URI \u5730\u5740<br \/>\n<code>* computer:\/\/\/ - \u5168\u90e8\u6302\u8f7d\u7684\u8bbe\u5907\u548c\u7f51\u7edc<br \/>\n* network:\/\/\/ - \u6d4f\u89c8\u53ef\u7528\u7684\u7f51\u7edc<br \/>\n* burn:\/\/\/ - \u4e00\u4e2a\u523b\u5f55 CDs\/DVDs \u7684\u6570\u636e\u865a\u62df\u76ee\u5f55<br \/>\n* smb:\/\/\/ - \u53ef\u7528\u7684 windows\/samba \u7f51\u7edc\u8d44\u6e90<br \/>\n* x-nautilus-desktop:\/\/\/ - \u684c\u9762\u9879\u76ee\u548c\u56fe\u6807<br \/>\n* file:\/\/\/ - \u672c\u5730\u6587\u4ef6<br \/>\n* trash:\/\/\/ - \u672c\u5730\u56de\u6536\u7ad9\u76ee\u5f55<br \/>\n* ftp:\/\/ - FTP \u6587\u4ef6\u5939<br \/>\n* ssh:\/\/ - SSH \u6587\u4ef6\u5939<br \/>\n* fonts:\/\/\/ - \u5b57\u4f53\u6587\u4ef6\u5939\uff0c\u53ef\u5c06\u5b57\u4f53\u6587\u4ef6\u62d6\u5230\u6b64\u5904\u4ee5\u5b8c\u6210\u5b89\u88c5 * themes:\/\/\/ - \u7cfb\u7edf\u4e3b\u9898\u6587\u4ef6\u5939<\/code><\/p>\n<p>\u8be6\u7ec6\u663e\u793a\u7a0b\u5e8f\u7684\u8fd0\u884c\u4fe1\u606f<br \/>\n<code>strace -f -F -o outfile <cmd><\/code><\/p>\n<p>\u8bbe\u7f6e\u65e5\u671f<br \/>\n<code>date -s mm\/dd\/yy<\/code><\/p>\n<p>\u8bbe\u7f6e\u65f6\u95f4<br \/>\n<code>date -s HH:MM<\/code><\/p>\n<p>\u5c06\u65f6\u95f4\u5199\u5165CMOS<br \/>\n<code>hwclock --systohc<\/code><\/p>\n<p>\u8bfb\u53d6CMOS\u65f6\u95f4<br \/>\n<code>hwclock --hctosys<\/code><\/p>\n<p>\u4ece\u670d\u52a1\u5668\u4e0a\u540c\u6b65\u65f6\u95f4<br \/>\n<code>ntpdate time.nist.gov<br \/>\nntpdate time.windows.com<\/code><\/p>\n<p>\u4ecemysql\u4e2d\u5bfc\u51fa\u548c\u5bfc\u5165\u6570\u636e<br \/>\n<code>mysqldump \u6570\u636e\u5e93\u540d > \u6587\u4ef6\u540d  #\u5bfc\u51fa\u6570\u636e\u5e93mysqladmin create \u6570\u636e\u5e93\u540d #\u5efa\u7acb\u6570\u636e\u5e93<br \/>\nmysql \u6570\u636e\u5e93\u540d < \u6587\u4ef6\u540d #\u5bfc\u5165\u6570\u636e\u5e93<\/code><\/p>\n<p>\u5fd8\u4e86mysql\u7684root\u53e3\u4ee4\u600e\u4e48\u529e<br \/>\n<code>\/etc\/init.d\/mysql stop<br \/>\nmysqld_safe --skip-grant-tables &<br \/>\nmysqladmin -u user password ''newpassword''''<br \/>\nmysqladmin flush-privileges<\/code><\/p>\n<p>\u4fee\u6539mysql\u7684root\u53e3\u4ee4<br \/>\n<code>mysqladmin -uroot -p password ''\u4f60\u7684\u65b0\u5bc6\u7801''<\/code><\/p>\n<p>\u4e0b\u8f7d\u7f51\u7ad9\u6587\u6863<br \/>\n<code>wget -r -p -np -k http:\/\/www.21cn.com<br \/>\n\u00b7 -r\uff1a\u5728\u672c\u673a\u5efa\u7acb\u670d\u52a1\u5668\u7aef\u76ee\u5f55\u7ed3\u6784\uff1b<br \/>\n\u00b7 -p: \u4e0b\u8f7d\u663e\u793aHTML\u6587\u4ef6\u7684\u6240\u6709\u56fe\u7247\uff1b<br \/>\n\u00b7 -np\uff1a\u53ea\u4e0b\u8f7d\u76ee\u6807\u7ad9\u70b9\u6307\u5b9a\u76ee\u5f55\u53ca\u5176\u5b50\u76ee\u5f55\u7684\u5185\u5bb9\uff1b<br \/>\n\u00b7 -k: \u8f6c\u6362\u975e\u76f8\u5bf9\u94fe\u63a5\u4e3a\u76f8\u5bf9\u94fe\u63a5\u3002<\/code><\/p>\n<p>\u5982\u4f55\u5220\u9664Totem\u7535\u5f71\u64ad\u653e\u673a\u7684\u64ad\u653e\u5386\u53f2\u8bb0\u5f55<br \/>\n<code>rm ~\/.recently-used <\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u67e5\u770b\u8f6f\u4ef6xxx\u5b89\u88c5\u5185\u5bb9 dpkg -L xxx \u67e5\u627e\u8f6f\u4ef6 apt-cache search \u6b63\u5219\u8868\u8fbe\u5f0f \u67e5\u627e\u6587 &hellip; <a href=\"https:\/\/blog.axqd.net\/?p=428\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u201cDebian\u5e38\u7528\u547d\u4ee4\u201d<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-428","post","type-post","status-publish","format-standard","hentry","category-10"],"_links":{"self":[{"href":"https:\/\/blog.axqd.net\/index.php?rest_route=\/wp\/v2\/posts\/428","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.axqd.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.axqd.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.axqd.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.axqd.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=428"}],"version-history":[{"count":0,"href":"https:\/\/blog.axqd.net\/index.php?rest_route=\/wp\/v2\/posts\/428\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.axqd.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=428"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.axqd.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=428"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.axqd.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=428"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}