????????????
??????? sort ?? uniq ???? (???? uniq ?? -u ?? -d ???).
????????? cut?? paste?? ?? join ?????????????????????????????cut????join??
?????????????????sort/uniq??????????????????????????????????效???????????????????a??b??? uniq??????????sort/uniq????????????????????????卸??sort?????????????????????????-T?????????/tmp????小??
????cat a b | sort | uniq > c # c is a union b ????
????cat a b | sort | uniq -d > c # c is a intersect b ????
????cat a b b | sort | uniq -u > c # c is set difference a - b ??
??????????????????????泄??????????????????????Linux?????????????LANG ??????????????????????????????些????????????些?????纾簊ort?????????????N???????????????UTF-8???????????????????????????ASCII???????????????????Disable???i18n ????????????byte????????????????export LC_ALL=C ??????????????????? .bashrc?????????????????????????sort??????锌?????????
??????? awk ?? sed???????????????些???????????????????纾�??????械????????? awk ‘{ x += $3 } END { print x }’?????????Python??3????????Python?????????????
??????? shuf ?????????????械??谢????????????????????小?
???????sort???????睢�???key??????-t??-k?????????????????????-k1??1????????????-k1???????????
????Stable sort (sort -s) ??????谩????纾�??????????????????????????校???????????校??????????????? sort -k1??1 | sort -s -k2??2
???????????????bash???????锟�?Tab???????????????????????渭????????????????????Tab????????纾�??????sort -t????????<tab>???????????????Ctrl-V????????Tab????????????<tab>?????????????????????$’ ’??
???????????????????????????????hd??????CentOS????hexdump??????????????????????????????????bvi????http://bvi.sourceforge.net/ ???
??????????????????????????????strings?????grep??????????????械??????
??????????????????????????? iconv?????????????? uconv ????????????????????Unicode????
???????????????????????????????split????split by size????csplit????split by a pattern????
???????????
???????????????????CPU???????????????????? iostat?? netstat?? top (?????? htop)?? ???? dstat ???睢�????????????????????????????????????????????iftop?? iotop??
????????????????????????free??vmstat???睢�????????????????? “cached” ???????????Linux?????????妾�????free?????
????Java ??????????小????????????????kill -3 <pid> ?????SIGQUIT??????JVM????????????????????????????????dump??stderr/logs??
??????? mtr ?????? traceroute ????????位???????????
????????????????socket?????????????????????????? iftop ?? nethogs??
????Apache??????? ab ????????????????????quick-and-dirty??????????????????????????????????????????????????????????????? siege??
????????????????????????? wireshark ?? tshark??
??????? strace ?? ltrace??????????????????????????????????????????????????hang??????????crash??failed?????????????????????profile????? -c ???????????-p?????attach??????????????
?????????ldd???????????????????????ldd????????
???????gdb????????????????械????????core dump??????慰???写???GDB??????????????????????
??????? /proc ???胁?????????????Linux?????????????????????????????????????????纾� /proc/cpuinfo?? /proc/xxx/cwd?? /proc/xxx/exe?? /proc/xxx/fd/?? /proc/xxx/smaps.
?????????????????????????????sar????????谩????????????? CPU?? ??妫� ???纾� ???????????
??????? dmesg ?????些???????????????????????