如何在Unix下按大小和基于子目录的文件排序?

时间:2019-11-15 09:01:18

标签: bash unix

我在文件中包含以下输入数据,并且需要获取如下所述的输出。 需要按大小(Asc / des)/按子目录排序

Below is the input which is there in a file:

120     /root/path2/part-00000-d3700305-428d-4b13-8161-42051f4ac5ed-c000.json
532     /root/path1/part-00000-9aa3e423-084b-406b-8c75-d50c369f1943-c000.json
100     /root/path1/Telephone-bill-September-2019-89051_path.doc
72      /root/path2/BishnuPrasadRout[5_0].doc
4       /root/path2/survey.csv
4       /root/path2/hello.c
4       /root/path1/pages.txt
4       /root/path1/hadoopexam.txt
Expected Output

120     /root/path2/part-00000-d3700305-428d-4b13-8161-42051f4ac5ed-c000.json
72      /root/path2/BishnuPrasadRout[5_0].doc
4       /root/path2/survey.csv
4       /root/path2/hello.c
532     /root/path1/part-00000-9aa3e423-084b-406b-8c75-d50c369f1943-c000.json
100     /root/path1/Telephone-bill-September-2019-89051_path.doc
4       /root/path1/pages.txt`*enter code here*`
4       /root/path1/hadoopexam.txt

`````````````````````````````````````````



0 个答案:

没有答案
相关问题