emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#28657: closed (Random sort-order in du)


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#28657: closed (Random sort-order in du)
Date: Sat, 30 Sep 2017 21:46:02 +0000

Your message dated Sat, 30 Sep 2017 15:45:49 -0600
with message-id <address@hidden>
and subject line Re: bug#28657: Random sort-order in du
has caused the debbugs.gnu.org bug report #28657,
regarding Random sort-order in du
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
28657: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=28657
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: Random sort-order in du Date: Sat, 30 Sep 2017 22:45:24 +0200 User-agent: KMail/5.2.3 (Linux/4.8.0-59-generic; KDE/5.26.0; x86_64; ; )

Hello!

 

I'm using Back-In-Time for backups. Out of curiosity, I wanted to know, how big the snapshots are and came across the FAQ:

 

https://github.com/bit-team/backintime/wiki/FAQ#how-can-i-check-if-my-snapshots-are-incremental-using-hard-links

 

They recommend:

 

du -hd1 /media/<USER>/backintime/<HOST>/<USER>/1/

 

Say I have a subdirectory structure in that folder like this:

 

+ 2015

I + FileA 1GB Inode 123

+ 2016

I + FileA 1GB Inode 123

+ 2017

+ FileA 1GB Inode 123

 

Now du returns something like:

1G 2016

0G 2015

0G 2017

1G .

 

So the hardlinked FileA is reported only once (this is actually the desired feature, to not report it thrice).

 

But now the order determines, which folder the size is reported against. But I had to learn, that the order of items in the filesystem is unpredictable:

 

https://serverfault.com/questions/406229/ensuring-a-repeatable-directory-ordering-in-linux#answer-675748

 

I'd like to suggest to add some sort-controlling options known from ls --sort

 

The desired behavior in this case would be either alphabetical or reverse-alphabetical to attribute the FileA to the first or last appearance in the tree respectively.

 

Thanxs

 

Holger

 

PS: coreutils 8.25 with ext4 file-system

 

--

|_|/ MfG

| |\ Holger Klene

 

PGP Key ID: 0x22FFE57E

Attachment: signature.asc
Description: This is a digitally signed message part.


--- End Message ---
--- Begin Message --- Subject: Re: bug#28657: Random sort-order in du Date: Sat, 30 Sep 2017 15:45:49 -0600 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0
tag 28657 notabug
stop


Hello,


On 2017-09-30 03:41 PM, Holger Klene wrote:
> * Assaf Gordon <address@hidden> [30.09.17 15:08]:
>> But if you use shell-globbing, the shell will automatically
>> order the directory alphabetically:
> 
>> $ du -c -hd1 data/*
>  
> 
> Who would have thought of passing multiple directories ...
> 
> This is the solution to my problem, though I better write it down to not
> forget, as I'm quite sure, I'll not remember it in a month :-)
>

Thank you for confirming.

I'm thus marking this bug report as "done", but discussion can continue
by replying to this thread.

regards,
 - assaf


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]