查找文件中的查找目标的数量
cat catalina.out.316_issue |grep pointCount=|awk -F '=' 'BEGIN {size=0;} {size=size+$3;} END{print "[end]size is ", size}'
find ./ -maxdepth 1 -name '*.log' |xargs grep "not in online" -l
find ./ -maxdepth 1 -name '*.log' |xargs grep "different" -l|xargs cp -t sizediff
Linux ls Command: Sort Files By Size
$ ls -S
$ ls -S -l
$ ls --sort=size -l
$ ls --sort=size *.avi
$ ls -S -l *.avi
$ ls -lSr
ls -l -S | sort -k 5 -n
$ls -lSh
du -sh *|sort -h
du -s *|sort -k 1 -n