Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

deleting a file and getting space back

Status
Not open for further replies.

ac325ci

MIS
Jan 16, 2004
128
0
0
US
so on friday i deleted a file that was 200mb from slice s0.. and did not see space free up.. anyways long story short.. thought i'd look at it today monday and its freed up now.. any ideas why it didnt free up friday ?? is there anything that can be done in these cases when u remove a file and space doesnt free up?? how about unmountin and remountin FS.. ? thanks in advance
 
If any process is still using the file when you delete it, the space will only be released once that process has finished with it. If it's a spurious use of the file, you could do a lsof to check which process has the file open and kill it (if you feel brave!), thus releasing the space more or less immediately.

I don't mind people who aren't what they seem. I just wish they'd make their mind up.

Alan Bennett.
 
What Ken stated is most like what happened.

What you can do to avoid situations like this is if the file to be "deleted" is a log or text file, instead of deleting it, try zeroing out the file:

> /dir/to/file/filename

also, you can check, like Ken said, if a process has the file in question open by using the 'lsof' command or by using:

fuser /dir/to/file/filemane

This will also list what processes are associated with the file.

Regards,
Chuck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top