当前位置: 首页 > Linux

01-06CommonlyusedLinuxcommands-statistics

时间:2023-04-06 11:22:50 Linux

sortingsort:usedforsorting-b:ignoreblankcharactersatthebeginning-f:treatlowercaselettersasuppercaseletters-h:sortbystoragecontentsize(KB,MB,GB)-n:sortbynumber,defaultorder-o:writetheresulttothefile-r:reverseorder-t:specifytheseparator-V:sortbythenumberversion-k:specifythekeywordforsorting(whichcolumntosortby),与-t参数配合使用#根据存储内容大小排序,默认识别KB,MB,GB$catsort_h60MB101000KB20MB300KB5A40GB50KB$sort-hsort_hA51050KB300KB1000KB20MB60MB40GB#倒序$sort-hrsort_h40GB60MB20MB1000KB300KB50KB105A#-n:按数字大小排序,默认顺序$catsort_n0100070786723300944002320103210257433306$sort-nsort_n0000109233067707833065743320103210244002#-t:specifytheseparator#-k:specifythekeywordforsorting(whichcolumntosortby),useitwiththe-tparameter$catsort_t1.2.3.42.1.2.33.3.4.28.7.6.46.4.9.71SP2SP3SP42SP1SP2SP33SP3SP4SP28SP7SP6SP46SP4SP9SP7#-t.:use"."asseparator;-k1:sortbythefirstcolumn$sort-t..7.6.48SP7SP6SP4