You are not logged in.

#1 2009-07-05 16:55:41

geo909
Member
Registered: 2008-09-07
Posts: 309

some CLI help please: ls and folder sizes + du and hidden files

Hello all,

I have two questions, any help would be appreciated:

1) Is there a way to make "ls -l" to show the 'real', total size of the folders (that is incl all files and subfolders recursively)?
I have looked the man page and I believe that there isn't, but just to make sure I'm not missing something..

2)Is there a way to tell du to ommit hidden files?

Thanks a lot in advance..

Offline

#2 2009-07-05 17:09:41

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: some CLI help please: ls and folder sizes + du and hidden files

* glob skips hidden files by default
du -sh *

Offline

#3 2009-07-05 17:16:50

arkham
Member
From: Stockholm
Registered: 2008-10-26
Posts: 516
Website

Re: some CLI help please: ls and folder sizes + du and hidden files

Procyon wrote:

* glob skips hidden files by default
du -sh *

shopt -s dotglob

big_smile *runs*


"I'm Winston Wolfe. I solve problems."

~ Need moar games? [arch-games] ~ [aurcheck] AUR haz updates? ~

Offline

#4 2009-07-05 17:27:24

sirocco
Member
Registered: 2008-03-10
Posts: 149

Re: some CLI help please: ls and folder sizes + du and hidden files

try ncdu

Offline

#5 2009-07-05 17:43:30

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: some CLI help please: ls and folder sizes + du and hidden files

arkham wrote:

shopt -s dotglob

shopt -s dotglob will turn this on (so you will scan hidden folders)
shopt -u dotglob will turn it off

Offline

#6 2009-07-05 18:18:26

geo909
Member
Registered: 2008-09-07
Posts: 309

Re: some CLI help please: ls and folder sizes + du and hidden files

Procyon wrote:

* glob skips hidden files by default
du -sh *

Thanks a lot!! That did the job!

@sirocco Thanks for the suggestion, I already know and use ncdu, and I love it!
I just want something quicker when I browse things quickly.

Offline

Board footer

Powered by FluxBB