按最大深度排序目录

时间:2016-03-21 23:00:24

标签: linux sorting

如何在bash脚本中按最大深度对目录进行排序

checkWinner

现在我要对我的目标进行排序

例如:

之前的我的目录:

int n = board[0][0] * board[0][1] * board[0][2];
n == 0; → has vacant cells
n == 1; → player 1 won
n == 8; → player 2 won 

后:

START=/home
echo "Root directory: $START"
DIRS=$(find "$START" -type d)

我如何计算最大深度?

非常感谢你们

1 个答案:

答案 0 :(得分:0)

你想要排序的顺序是什么? 看起来你想要排序的顺序是哪个dir最多的子目录到目录最少的子目是这是正确的,如果它是我可能能够帮助... o你可以解释你的总体目标???

添加此行du -h --max-depth 3 test3 test test4 test2

如果这不是你想要的,请添加更多信息!

相关问题