Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用此命令列出存档中的所有文件:
tar jtvf blah.tar.bz2
如何按大小排序列出它们?还是只列出最大的文件(即大于 10MB 的文件)?
列出文件,按大小过滤,仅打印大小+空格+路径,仅按大小排序,降序:
size=10485760 tar tvf blah.tar.bz2 \ | awk -v size="$size" '$3 >= size {print $3" "$6}' \ | sort -t' ' -k1,1nr