cancel
Showing results for 
Search instead for 
Did you mean: 

The / directory is full

 
SOLVED
Go to solution
hangyu
Regular Advisor

The / directory is full

The / directory is 100% used now , but I am sure what I have done that made it full , can advise how can I know what large file is in / directory ? how can I know the size of each directory ?

p.s. I try to check with "top" but nothing found .
15 REPLIES 15
Matti_Kurkela
Honored Contributor

Re: The / directory is full

"top" lists processes ordered by CPU use, not files.

To get the size of each directory (including their sub-directories) ordered by size (largest first), only at the current filesystem:

cd / (or wherever the problem is)
du -kx | sort -rn |more

Typical causes of / going 100% full:
- a big "core" file in /
- if you have huge VGs, the LVM configuration backup files in /etc/lvmconf may grow too large for the root filesystem.
MK
Peter Godron
Honored Contributor

Re: The / directory is full

Hi,
commands to look at are:
du -sk *
find / -xdev -size +1000000c
find / -xdev -mtime +1
MarkSyder
Honored Contributor

Re: The / directory is full

Another cause is someone mis-typing a tape drive name which results in a large file in /dev.

cd /dev
find . -type f -print

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
Hemmetter
Esteemed Contributor

Re: The / directory is full

Hi hangyu

"top" command shows running processes nothing related to filesystems.

1) try to find big files:

#find / -xdev -type f -size +10000 -exec ls -l {} \+

have a special focus on "core"s, files under /dev


2) try to find deleted but still-in-use files:
# lsof +L1


rgds
HGH




Robert-Jan Goossens
Honored Contributor

Re: The / directory is full

Hi,

# du -k | sort -rn | more

Find the largest dir and (re)move the files to a more appropriate location.

# find / -size +10000 -xdev -type f -exec ll {} \;
above command will find "large" files


Regards,
Robert-Jan
Ralph Grothe
Honored Contributor

Re: The / directory is full

# cd / && du -skx $(ls -p|grep /\$)
Madness, thy name is system administration
SANTOSH S. MHASKAR
Trusted Contributor

Re: The / directory is full

Hi,

go to /

# cd /
# for i in `ll .|grep ^d|awk '{print $9}'`; do du -rsk $i; done|sort -nk 1

This will give u usage in KB of each dir under /.

Ignore mount point of other filesystems and
explore remaining dir.

Then under each remaining dir repeat above

Also if u want to sort files by size use

# ll .|sort -rk5

Inspect the files and remove unwanted files.


-Santosh
Reshma Malusare
Trusted Contributor

Re: The / directory is full

Hi hangyu,
1] top command
display and update information about the top processes on the system

2] To see large files

# find / -size +10000 -xdev -type f -exec ll {} \

3] du command

The du command gives the number of 512-byte blocks allocated for all files and (recursively) directories within each directory and file specified by the name operands.


Thanks & Regards
Reshma
V. Nyga
Honored Contributor

Re: The / directory is full

Hi,

with 'bdf' you can see which directories doesn't belong to '/'.
Check /dev, /tmp (if it belongs to /).
Also, if /var belongs to /, do a patch cleanup - see 'man cleanup' for the syntax you need.

Any feed back from you till now?

Volkmar
*** Say 'Thanks' with Kudos ***