The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to watch for file creation/deletion? siegfried High Level Programming 5 11-12-2007 10:48 PM
Prompting for file deletion? NycUnxer Shell Programming and Scripting 2 11-01-2007 01:36 PM
file deletion problem shdwsclan UNIX for Dummies Questions & Answers 2 01-26-2006 07:59 PM
Deletion of File in Unix rhomel101 UNIX for Dummies Questions & Answers 2 02-21-2005 10:47 PM
File deletion when server restarts k_oops9 Shell Programming and Scripting 6 11-22-2004 07:07 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 08-24-2005
Registered User
 

Join Date: Dec 2004
Posts: 38
large file deletion

OS: Solaris 8

I deleted a large file (around 13 Gigs) from my system.
But the output of df -k remains the same. The
capacity % is constant. However one strange thing
is happening- My available space is decreasing, my used
space in increasing (The opposite should happen).
This is happening for my /export/home and /var/run slices.

What is happening?? Is my filesystem going to be full ??
Reply With Quote
Forum Sponsor
  #2  
Old 08-24-2005
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 4,264
Something else is going on.
try this:
Code:
#!/bin/ksh
# spacehog
while getopts 2>/dev/null r c
do
  case $c in
    r) find . -type f | xargs ls -la |cut -c35-45,59-120 \
       | sort -r -n  ; exit 0 ;;
   \?) echo "\nUsage: $0 [-r]
       list the byte count and name of files in current dir sorted by size
       -r recursively lists all of the subdirectories as well" >&2
        exit 2;;
  esac
done
Code:
cd /export/home 
spacehog -r | head -20
This will find really big files for you. Keep track over a few hours to see what is happening to file sizes, and if new, even larger files appear.

And, yes, your filesytem will eventually fill up.
Reply With Quote
  #3  
Old 08-25-2005
Registered User
 

Join Date: Jul 2005
Location: England
Posts: 183
If you delete any file for which the system still has an open file handle then the space taken up by that file is not recovered untill the file handle(s) are closed.

The file you deleted was probably open by a process that is still running. Rebooting is an extreme (if guarneteed) method of fixing. You should be able to us lsof (if installed) to find the process.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 07:11 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0