Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

no space gained after gzip

Posted on 2006-06-15
3
Medium Priority
?
463 Views
Last Modified: 2013-12-27
Im gzipping about 7 GB worth of log files, i.e. gzip -9v *06-2006, the files them selve are compressed as an "ls-l" shows the new file size of the *.gz files. However a "df -k" shows the drive is still 86% capacity.
0
Comment
Question by:ruggerrick
2 Comments
 
LVL 2

Assisted Solution

by:fpintos
fpintos earned 75 total points
ID: 16918058
Your log files might still be "open" by some background process.

On Solaris/Unix system, space occupied by a file will only free back to the filesystem if and only if there is no more reference to that file. If a process has the file "open" and reading/writing to it, even if you delete the file, the space will not will return to the free space of the filesystem.

I asusmed you have deleted the log files, so the quckest way to gain back all your apce is to reboot the machine.
0
 
LVL 5

Accepted Solution

by:
devrick0 earned 75 total points
ID: 16927118
How big are the log files?  Your current log file could be large and require it to be zipped up as well.  You could always copy the current log file to another location or drive if need be.  Then while you're gzipping (I'm assuming you're using gzip -9 for max compression) that log file, you can do a cat /dev/null > log_file to zero out the original log file that you already made a copy of.  

Also, are you sure it's only log files taking up space?  I ran across a situation before where an app was installed incorrectly and was creating core dumps every 15 minutes.  You might want to just check your system for core files and if there are old ones you don't need you can get rid of them.  
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question