initial commit
This commit is contained in:
10
duout.py
Normal file
10
duout.py
Normal file
@@ -0,0 +1,10 @@
|
||||
# create du.out with (for example)
|
||||
#
|
||||
# du -cd 1 logger/2016 > du.out
|
||||
|
||||
with open('du.out') as f:
|
||||
duout = [line.split(None,1) for line in f.read().split('\n')]
|
||||
while len(duout[-1]) != 2:
|
||||
duout = duout[:-1]
|
||||
for size, file in sorted([(int(size), file) for size, file in duout]):
|
||||
print(size, file)
|
||||
Reference in New Issue
Block a user