Thomas Guettler wrote:
> Hi,
>
> I use "du -ax / | sort -rn > /var/tmp/du-`date --iso`" to get the sorted
>
> Unfortunately you can't see a difference between a directory and a file
> in the output. It would be nice if the directories would be added by a
> slash.
>
> This way you can see if a line is a directory or not. This is even more
> important
> if you want to use the output for a script.
>
> I suggest 'du --dir-with-slash' or 'du --trailing-slash' as parameter.
If we were going to do that we should do it unconditionally.
I can't see how it would break existing scripts.
POSIX can't disallow that can it!
As an alternative try:
find / -xdev -printf "%k\t%p%y\n" |
sed 's/d$/\//;t; s/.$//;' |
LC_ALL=C sort -rn -k1,1
Pádraig.