On Sat, Dec 12, 2015 at 06:00:38AM -0800, Russell Senior wrote:
> >>>>> "John" == John Jason Jordan <[email protected]> writes:
>
> John> I wish to print a list of directories (but not the files or
> John> subdirectories contained in the directories) on Xubuntu 12.04 (up
> John> to date). I normally use the GUI file manager Thunar, but it has
> John> no menu item to print anything. There is, however, Edit >
> John> Configure custom actions, which appears to require me to use
> John> xfprint with specific options, but I haven't found much
> John> information about using xfprint.
>
> John> I suspect this might be easier from the command line, but I don't
> John> know where to start looking for the right tool. That is, I have
> John> used lpr in the past and I have a fair idea of what the available
> John> options are, but lpr seems to be useful only for printing the
> John> contents of a file, not for printing a list of folders.
>
> How about:
>
> du | cut -f 2-
>
> The du utility descends a directory tree and tells you how many 1k
> blocks are stored in each subtree (or something like that), giving you a
> rough idea of where your diskspace is going. The "cut -f 2-" part just
> throws the disk usage information away.
for the directories in the current directory with disk space used in
nice human format:
du -sh */
optionally to sort it by the amount of space used
su -sh */ | sort -h
Which from my laptop's home directory gives output like
michael@bivy ~ % du -sh */ | sort -n | head
1.1G Dropbox/
1.1G photos/
1.2G Cloud/
1.2G Language/
1.4G Videos/
[bunch of stuff snipped]
940K Travel/
986M droid/
997M Phone/
Sort with -hr to make it smallest to biggest.
--
Michael Rasmussen, Portland Oregon
Be Appropriate && Follow Your Curiosity
If you want to build a ship,
don't drum up people to collect wood and
don't assign them tasks and work, but rather
teach them to long for the endless immensity of the sea."
~ Antoine de Saint Exupéry
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug