You are not logged in.

#1 2010-07-20 18:19:19

Lowra
Member
Registered: 2009-09-21
Posts: 192

How to know which folder use the biggest space on disk ?

Hello
I just noticed a little problem

[lowra@desktop ~]$ df -h
Filesystem            Size  Used Avail Use% Mounted on
udev                   10M  172K  9.9M   2% /dev
/dev/sda1              19G   18G   24M 100% /
shm                   2.0G  140K  2.0G   1% /dev/shm
/dev/sda5             450G  9.8G  417G   3% /mnt/sda5
/dev/sda6             450G  260G  168G  61% /mnt/sda6

I really don't know HOW CAN I use 19GB yikes
I have 1.7GB in my /home/lowra, and and just some lightweight apps installed, I really don't understand...

How can I know which folder or file uses this space ? With command line please

Thank you wink

Offline

#2 2010-07-20 18:22:54

Barrucadu
Member
From: York, England
Registered: 2008-03-30
Posts: 1,158
Website

Re: How to know which folder use the biggest space on disk ?

du -sh /*

/usr tends to be big.

Offline

#3 2010-07-20 18:26:20

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: How to know which folder use the biggest space on disk ?

ncdu is ncurses-based tool - you can easily traverse dir structure.

Offline

#4 2010-07-20 18:28:12

Ashren
Member
From: Denmark
Registered: 2007-06-13
Posts: 1,229
Website

Re: How to know which folder use the biggest space on disk ?

 du -mx / | sort -n

Lists as MBs and sorts by size. Check "man du" for details on the options used.

Usually it is /var and /tmp that gets full.

Offline

#5 2010-07-20 18:30:01

toad
Member
From: if only I knew
Registered: 2008-12-22
Posts: 1,775
Website

Re: How to know which folder use the biggest space on disk ?

Let me guess... /var/cache/pacman/pkg smile


never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::

Offline

#6 2010-07-20 18:34:22

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: How to know which folder use the biggest space on disk ?

Ashren wrote:
 du -mx / | sort -n

Lists as MBs and sorts by size. Check "man du" for details on the options used.

Usually it is /var and /tmp that gets full.

I think OP is more interested in the biggest files

 du -mx / | sort -rn

Offline

#7 2010-07-20 18:46:02

Ashren
Member
From: Denmark
Registered: 2007-06-13
Posts: 1,229
Website

Re: How to know which folder use the biggest space on disk ?

karol wrote:
Ashren wrote:
 du -mx / | sort -n

Lists as MBs and sorts by size. Check "man du" for details on the options used.

Usually it is /var and /tmp that gets full.

I think OP is more interested in the biggest files

 du -mx / | sort -rn

Why does the OP write the following then:

How can I know which folder or file uses this space ?

Besides the r option only reverses the sort output - it is a matter of taste how one wants to see it. I prefer "sort -n".

Offline

#8 2010-07-20 18:51:51

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: How to know which folder use the biggest space on disk ?

@ Ashren
Actually, you're right: you can view it w/ either 'head' or 'tail'.

sudo du -s /usr/* /var/*| sort -nr

would be a good starter too.

Offline

#9 2010-07-20 18:58:04

Lowra
Member
Registered: 2009-09-21
Posts: 192

Re: How to know which folder use the biggest space on disk ?

So,
I have done pacman -Scc recently so it's not/var/cache/pacman/pkg

[lowra@desktop ~]$ sudo du -s /usr/* /var/*| sort -nr
Password: 
1295892    /usr/lib
689156    /usr/share
167300    /usr/bin
117144    /usr/include
67852    /var/lib
14912    /var/log
13504    /usr/src
9840    /usr/sbin
3880    /var/cache
112    /var/run
36    /usr/local
20    /var/spool
12    /var/tmp
8    /var/lock
4    /var/opt
4    /var/local
4    /var/games
4    /var/empty
0    /var/mail

So, I don't know what to do now

Offline

#10 2010-07-20 19:01:00

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: How to know which folder use the biggest space on disk ?

That means toad was wrong.
Let's take a step back and

sudo du -s /* | sort -nr

Edit: [OT] who knew that there is a word 'meas'?

Last edited by karol (2010-07-20 19:03:11)

Offline

#11 2010-07-20 19:23:16

Lowra
Member
Registered: 2009-09-21
Posts: 192

Re: How to know which folder use the biggest space on disk ?

[lowra@desktop ~]$ sudo du -s /* | sort -nr
du: cannot access `/home/lowra/.gvfs': Permission denied
du: cannot access `/proc/8601/task/8601/fd/3': No such file or directory
du: cannot access `/proc/8601/task/8601/fdinfo/3': No such file or directory
du: cannot access `/proc/8601/fd/3': No such file or directory
du: cannot access `/proc/8601/fdinfo/3': No such file or directory
283866344    /mnt
14545388    /home
2292876    /usr
139412    /lib
86824    /var
15440    /tmp
13592    /boot
9588    /sbin
5208    /bin
3484    /etc
172    /dev
40    /root
16    /media
16    /lost+found
12    /srv
4    /opt
4    /lib64
0    /sys
0    /proc

Offline

#12 2010-07-20 19:29:54

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: How to know which folder use the biggest space on disk ?

> I have 1.7GB in my /home/lowra
But your /home is ten times as big.

> 283866344    /mnt
Huh?

[karol@black ~]$ du -sh /mnt
12K    /mnt

You better find out what's in there. If you don't come back in 5hrs we leave w/o you.

Offline

#13 2010-07-20 19:37:25

Lowra
Member
Registered: 2009-09-21
Posts: 192

Re: How to know which folder use the biggest space on disk ?

karol wrote:

> I have 1.7GB in my /home/lowra
But your /home is ten times as big.

> 283866344    /mnt
Huh?

[karol@black ~]$ du -sh /mnt
12K    /mnt

You better find out what's in there. If you don't come back in 5hrs we leave w/o you.

In /mnt I have:
/mnt/sda5 & /mnt/sda6 with all my data, it's normal.
I will check what is happening to my home

EDIT: Ok I found:
The folder /home/david/.local/share/Trash/files contains all the files I have deleted since hum... a long time ago.
His weight is ~14.1 GB
It seems to be a bug of pcmanfm because I use pcmanfm  0.9.7-1 as file manager, Trash support in enabled in it, but my Trash can is empty, I have done "empty trash" several time and nothing seems to change

Last edited by Lowra (2010-07-20 19:44:28)

Offline

#14 2010-07-20 19:40:27

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: How to know which folder use the biggest space on disk ?

> /mnt/sda5 & /mnt/sda6 with all my data, it's normal.
Sorry, I mixed up two similar threads. Sure you can't have 25 GB /mnt in a 19 GB /

Offline

#15 2010-07-20 19:53:09

toad
Member
From: if only I knew
Registered: 2008-12-22
Posts: 1,775
Website

Re: How to know which folder use the biggest space on disk ?

karol wrote:

That means toad was wrong.

>hangs head in shame...<


never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::

Offline

#16 2010-07-20 19:56:46

Lowra
Member
Registered: 2009-09-21
Posts: 192

Re: How to know which folder use the biggest space on disk ?

The folder /home/david/.local/share/Trash/files contains all the files I have deleted since hum... a long time ago.
His weight is ~14.1 GB
It seems to be a bug of pcmanfm because I use pcmanfm  0.9.7-1 as file manager, Trash support in enabled in it, but my Trash can is empty, I have done "empty trash" several time and nothing seems to change

What do you think about my "discovery" and my "interpretation" ?
Should I fill a bug report to the Arch Bug Tracker ? To the upstream bug tracker of pcmanfm project ?

Offline

#17 2010-07-20 20:03:54

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: How to know which folder use the biggest space on disk ?

I'd open it upstream if it really is a bug and not some kind of misconfiguration. Check if upstream didn't recently fix it first.

Offline

#18 2010-07-20 21:47:13

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: How to know which folder use the biggest space on disk ?

Lowra wrote:

EDIT: Ok I found:
The folder /home/david/.local/share/Trash/files contains all the files I have deleted since hum... a long time ago.
His weight is ~14.1 GB
It seems to be a bug of pcmanfm because I use pcmanfm  0.9.7-1 as file manager, Trash support in enabled in it, but my Trash can is empty, I have done "empty trash" several time and nothing seems to change

You need gvfs installed for the Trash to work properly in PCManFM 0.9.7. In the meantime just delete the trash folder manually.

Last edited by anonymous_user (2010-07-20 21:47:24)

Offline

#19 2010-07-20 22:08:15

olvar
Member
Registered: 2009-11-13
Posts: 97

Re: How to know which folder use the biggest space on disk ?

In case any one is interested, i find xdiskusage to be useful when I am lazy enough not to dig deeper in to the directories.

Offline

#20 2010-07-21 05:34:28

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,545

Re: How to know which folder use the biggest space on disk ?

xdiskusage and tools like it are utterly brilliant.
I wish there wasn't such a garish one for GNU/Linux though hmm

MaximumPC recommended one a while ago for Windows that I loved.  Color-coding and modern widgets is nice.  Anyways.

Last edited by Ranguvar (2010-07-21 05:36:02)

Offline

Board footer

Powered by FluxBB