????????????
??????? 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 ??????????????????????????????Щ????????????Щ?????磺sort?????????????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 ?????Щ???????????????????????