Solved

no space gained after gzip

Posted on 2006-06-15
3
457 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
3 Comments
 
LVL 2

Assisted Solution

by:fpintos
fpintos earned 25 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 25 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.

840 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