Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]How do I check the space used by all files/folders?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Nazgulled
Guru
Guru


Joined: 04 Aug 2005
Posts: 485

PostPosted: Sun Dec 02, 2007 4:16 am    Post subject: [SOLVED]How do I check the space used by all files/folders? Reply with quote

I know this is such a trivial question but I don't know how to do it and google shows me different commands. I want to know what is the best command to show me how much space is being used by all files/folders in my Gentoo system. I need a value as accurate as possible but I don't which command should I use to do that.

Please advise...


Last edited by Nazgulled on Sun Dec 02, 2007 3:09 pm; edited 1 time in total
Back to top
View user's profile Send private message
OmSai
l33t
l33t


Joined: 30 Sep 2007
Posts: 605
Location: Manchester, CT, USA

PostPosted: Sun Dec 02, 2007 4:31 am    Post subject: Reply with quote

Code:
$ df


If you don't find a command in google you can reverse find searching the concept it deals with apropos.
That command searches through the 1-line man (manual) descriptions.
Quote:
$ apropos disk

Tie::File (3pm) - Access the lines of a disk file via a Perl array
cfdisk (8) - Curses based disk partition table manipulator for Linux
df (1) - report file system disk space usage
df (1p) - report free disk space
edd_id (8) - udev callout to identify BIOS disk drives via EDD
fd (4) - floppy disk device
fdformat (8) - Low-level formats a floppy disk
fdisk (8) - Partition table manipulator for Linux
git-count-objects (1) - Count unpacked number of objects and their disk consumption
hd (4) - MFM/IDE hard disk devices
hdparm (8) - get/set hard disk parameters
initrd (4) - boot loader initialized RAM disk
mkboot (8) - makes a bootdisk
partx (8) - telling the kernel about presence and numbering of on-disk partitions
quotactl (2) - manipulate disk quota
ram (4) - ram disk device
rdev (8) - query/set image root device, RAM disk size, or video mode
sd (4) - Driver for SCSI Disk Drives
setfdprm (8) - sets user-provided floppy disk parameters
sfdisk (8) - Partition table manipulator for Linux
sync (2) - commit buffer cache to disk
sync (8) - synchronize data on disk with memory
sync_file_range (2) - sync a file segment with disk
xspirograph (6) - simulates the rotation of a disk inside a circular rim
Back to top
View user's profile Send private message
Nazgulled
Guru
Guru


Joined: 04 Aug 2005
Posts: 485

PostPosted: Sun Dec 02, 2007 12:55 pm    Post subject: Reply with quote

Thanks.

By the way the "apropos disk" says: "disk: nothing appropriate" :S
Back to top
View user's profile Send private message
format_c
n00b
n00b


Joined: 16 Jul 2004
Posts: 45
Location: Germany/Hessen/Bad Koenig

PostPosted: Sun Dec 02, 2007 1:02 pm    Post subject: Reply with quote

How about
Code:
du -s /

?

This should print the bytes used by all files and folders among all your file systems.
You can add the parameter -h to make it human readable.
Hope that helped.

Cheers
_________________
Board - PerlCommunity.de
Links - PerlCommunity.de
Wiki - PerlCommunity.de
Back to top
View user's profile Send private message
Nazgulled
Guru
Guru


Joined: 04 Aug 2005
Posts: 485

PostPosted: Sun Dec 02, 2007 1:17 pm    Post subject: Reply with quote

that takes a bit longer but also works...

What if I want to see which folder is the largest in the root?
Back to top
View user's profile Send private message
format_c
n00b
n00b


Joined: 16 Jul 2004
Posts: 45
Location: Germany/Hessen/Bad Koenig

PostPosted: Sun Dec 02, 2007 1:53 pm    Post subject: Reply with quote

Do not exactly know but would guess
Code:

find / -maxdepth 1 -type d -print0 | xargs -0 du -s | sort -rn

!NOT TESTET!

Cheers
_________________
Board - PerlCommunity.de
Links - PerlCommunity.de
Wiki - PerlCommunity.de
Back to top
View user's profile Send private message
Nazgulled
Guru
Guru


Joined: 04 Aug 2005
Posts: 485

PostPosted: Sun Dec 02, 2007 3:08 pm    Post subject: Reply with quote

Nevermind, there's a tool exactly for that on GNOME.
Back to top
View user's profile Send private message
georgir
n00b
n00b


Joined: 29 Nov 2007
Posts: 9

PostPosted: Mon Dec 03, 2007 1:05 pm    Post subject: Reply with quote

format_c wrote:
Do not exactly know but would guess
Code:

find / -maxdepth 1 -type d -print0 | xargs -0 du -s | sort -rn

!NOT TESTET!

Cheers
wow... just wow
Code:
du -s /* | sort -rn

dude, think gloves.
Back to top
View user's profile Send private message
swimmer
Veteran
Veteran


Joined: 15 Jul 2002
Posts: 1330
Location: Netherlands

PostPosted: Mon Dec 03, 2007 5:33 pm    Post subject: Reply with quote

There is a very nice console program which does precisely that: sys-fs/ncdu

HTH
swimmer
Back to top
View user's profile Send private message
tarpman
Veteran
Veteran


Joined: 04 Nov 2004
Posts: 1083
Location: Victoria, BC, Canada

PostPosted: Mon Dec 03, 2007 6:43 pm    Post subject: Reply with quote

Nazgulled wrote:
By the way the "apropos disk" says: "disk: nothing appropriate" :S

Try running makewhatis(8).
_________________
Saving the world, one kilobyte at a time.
Back to top
View user's profile Send private message
format_c
n00b
n00b


Joined: 16 Jul 2004
Posts: 45
Location: Germany/Hessen/Bad Koenig

PostPosted: Wed Dec 12, 2007 10:07 am    Post subject: Reply with quote

georgir wrote:
format_c wrote:
Do not exactly know but would guess
Code:

find / -maxdepth 1 -type d -print0 | xargs -0 du -s | sort -rn

!NOT TESTET!

Cheers
wow... just wow
Code:
du -s /* | sort -rn

dude, think gloves.


Know about your version.
But doesn't match exactly requirements:
Nazgulled wrote:
that takes a bit longer but also works...

What if I want to see which folder is the largest in the root?

_________________
Board - PerlCommunity.de
Links - PerlCommunity.de
Wiki - PerlCommunity.de
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum