ranger-users
[Top][All Lists]
Advanced

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

Re: [Ranger-users] Sorting by directory size


From: Roman Z.
Subject: Re: [Ranger-users] Sorting by directory size
Date: Sat, 22 Oct 2011 05:29:13 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

> If you type 'os' in ranger, you can sort files in ranger by size. I'm
> wondering if it would be possible to make it "recursive"/"cumulative" in how
> it interprets file sizes, similar to how the "du" tool works, ordered by how
> much total space would be freed up by deleting each file/dir. I realize
> there would be some performance cost in recursively analyzing big
> directories, so maybe that's too complicated to implement or out of ranger's
> scope...
> 
> David

I always thought it's a pretty unnecessary feature since we got dU.

But today I happened to be in a situation where this would've been very
helpful, even if it performed poorly.  Typing dU all the time kind of
sucked indeed.  Seeing how often this has been requested already, I
implemented it after all:

1. Type "dc" to activate cumulative size checking on the selected
directories.  Depending on the number of files in the directories, this
might take very long.  (Type "vdcv" to use this on all directories.)
2. Type "os" to sort by size
3. Type "zd" to disable "list dirs first" if you like, since the sizes
of files and directories are now directly comparable.

Note that directories that show the cumulative size will not have their
size updated, since it's an expensive operation.  You can manually
update the size by typing "dc" again or turning on the option
"autoupdate_cumulative_size" (e.g. by typing "zu".)

Also, "dc" is currently not stoppable and blocks ranger.  I'll work on
it later (maybe.)




reply via email to

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