Web Hosting Talk







View Full Version : Linux newbie question about deleting files


twrs
12-07-2002, 01:16 PM
I'm wondering why every time I deleted files (using the rm command) on my Linux server, the used disk space for the files seemed not to be freed up? I mean the free disk space status stayed the same after I deleted the files.

Am I missing something or is there any command I should run to force the system to recalculate the free disk space?

Thanks in advance!

rcs
12-07-2002, 01:18 PM
You might have a corrupted file system

twrs
12-07-2002, 01:32 PM
How do I check and fix that then?

rcs
12-07-2002, 01:33 PM
use the utility fsck

thedavid
12-07-2002, 02:02 PM
Originally posted by rcs
use the utility fsck

The easiest way I've been able to describe to linux newbies on how to do this is to use this command:

shutdown now -F

the -F forces a fsck on reboot.

If this is a managed server, your provider should be able to assist you in this as well.

-David

twrs
12-07-2002, 02:05 PM
What's the exact and safe command for fsck?
Do I need to stop all services on the server before running fsck?

It just makes me nervous cause I got this warning message:

Parallelizing fsck version 1.23 (15-Aug-2001)
e2fsck 1.23, 15-Aug-2001 for EXT2 FS 0.5b, 95/08/09
/dev/hda2 is mounted.

WARNING!!! Running e2fsck on a mounted filesystem may cause SEVERE filesystem damage.

Do you really want to continue (y/n)? no

rcs
12-07-2002, 02:18 PM
thats good, cuase you should run fsck in singel user mode when the filesystem is unmounted. I suggest you read the manual (or hire a proffesional).

twrs
12-07-2002, 03:10 PM
I just ran the command "shutdown -rF now" and it seemed to fix the problem. Thanks everyone!