LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-23-2010, 09:48 AM   #1
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,697

Rep: Reputation: 48
rm 63GB file, df not showing space freed


I did a rm on a file that was 63GB, but then when i do a df -h afterward, it doesn't reflect that file being removed. Any ideas?
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 07-23-2010, 09:55 AM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,823

Rep: Reputation: 611Reputation: 611Reputation: 611Reputation: 611Reputation: 611Reputation: 611
A process is still using it. Stop the process or reboot.
 
1 members found this post helpful.
Old 07-23-2010, 09:56 AM   #3
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,697

Original Poster
Rep: Reputation: 48
So it would disappear from a ls yet its not really deleted? that's scary
 
Old 07-25-2010, 02:58 AM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,374

Rep: Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383
That's a basic design in *nix. The unlink cmd (real delete cmd used) 'removes' the file, but it remains until the last program closes it.
You can use this to create 'invisible' temp files; useful during uploading and avoiding a race condition that could be exploited by a cracker.
There is now a POSIX tmpfile() fn in C that handles all that, but this unlink() feature remains in *nix.
http://www.opengroup.org/onlinepubs/...s/tmpfile.html
 
1 members found this post helpful.
Old 07-25-2010, 03:40 AM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
You can use:
lsof +L 1
to list delete open files on your system. The pid of the process that has it open will be included in the listing.
 
2 members found this post helpful.
Old 07-26-2010, 07:48 AM   #6
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,697

Original Poster
Rep: Reputation: 48
Thanks guys. guess i'm just used to other OS's where if you try to delete an open file it won't allow you.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
user need to increase space to run a program its showing not enough space svani Red Hat 4 04-16-2010 04:04 AM
Problem installing kubuntu (involves freed partitions space) gingerkid123 Linux - Newbie 4 04-05-2010 08:23 PM
A question about showing disk space thomas2004ch Linux - Newbie 3 10-20-2009 03:30 AM
file deleted, but no space freed kpachopoulos Linux - General 3 02-07-2008 10:43 AM
kernel 2.6.13 - space not freed to kernel sarunya Linux - General 6 09-02-2005 09:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration