Gentoo Archives: gentoo-user

From: Frank Steinmetzger <Warp_7@×××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Record sizes of directories of a directory tree (huge) most efficiently
Date: Wed, 03 Feb 2016 00:12:33
Message-Id: 20160203001213.GA4996@asp.fritz.box
In Reply to: [gentoo-user] Record sizes of directories of a directory tree (huge) most efficiently by Meino.Cramer@gmx.de
1 On Wed, Jan 27, 2016 at 05:25:37PM +0100, Meino.Cramer@×××.de wrote:
2 > Hi,
3 >
4 > I want to determine the size of the contents of all directories of a
5 > tree of directories on a hexacore AMD64 machine with 4GB RAM an one
6 > harddisk (containing that tree) -- most efficiently (least time
7 > consuming).
8
9 A bit late to the game, but here is my way for this.
10 For a one-off thing, I use the already-mentioned excellent ncdu, which
11 provides vi-style navigation and even offers interactive deletion.
12
13 du is a viable option for quick use on smaller lists. But when it comes down
14 to actual comparable lists to be stored and archived, I like to use tree. In
15 particular, I use it to store lists of content of my external harddisks, so
16 I can find out what I stored where without having to turn the disks on,
17 including used disk space.
18
19 For that purpose, I use two different outputs. One paints the tree as such
20 using ascii art, showing the size next to the indented name:
21 tree -ax -n --du -h --dirsfirst
22
23 The other one is a tabular format that is easier to look at in long lists,
24 because it aligns size and date and prints the whole path, which also makes
25 it easier to diff:
26 tree -afx -DFins --dirsfirst --du --timefmt "%F %T"
27
28 Tata
29 --
30 Gruß | Greetings | Qapla’
31 Please do not share anything from, with or about me on any social network.
32
33 I had a problem and used Java. Now I have a ProblemFactory.

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies