sebp;508142 Wrote: 
> Free space not increasing on a filesystem although you delete some files
> is what happens when some program still has these files open.
> Before deleting files, you can check whether some program has them open
> by using the -fuser- command (or -lsof- if you want to see all open
> files).

Don't think that's the issue if he's managed to unmount (which won't
work if files are open, even deleted files with hanging file handles).

'du' is your friend.

It will show you how much disk space is used and, more importantly, in
which directories.  There is a caveat though, so keep reading...

'du /mnt'  will show you all the subdirectories of '/mnt' and the size
of their contents.  Of course, you don't really care about the little
ones in a case like this, you want to find the big ones!

'du /mnt | sort -n' will take the output of du and run it through
'sort' and sort numerically.  Big things will be at the end.

If you don't want to watch it scroll, you can add 'tail' to the end:
du /mnt | sort -n | tail -20

Will get how much space is in each directory, sort it, and show the 20
largest.

Now the caveat: du and df compute things a bit differently.  Unix has a
nifty feature called 'hard links' which is basically that two entries in
the file system can point to the same spot on the disk.  This may sound
odd, but it is very useful in many contexts.

'df' which shows free space, doesn't follow the directories, it just
looks at a list of unused blocks and figures it out from there.

'du', on the other hand, follows the directories, and ignores what the
used count on the drive says.  So hard linked files get counted multiple
times, even though each one uses the same physical space on the drive. 
So you may delete something that is a hard link, and it will not really
free any space because somewhere else on the file system is a pointer to
that space, so it's not reusable.

I don't think that's your case... most users have no clue about hard
links and how/why to use them.  But I'm being pedantic.


-- 
snarlydwarf
------------------------------------------------------------------------
snarlydwarf's Profile: http://forums.slimdevices.com/member.php?userid=1179
View this thread: http://forums.slimdevices.com/showthread.php?t=74258

_______________________________________________
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix

Reply via email to