Solved

no space gained after gzip

Posted on 2006-06-15
3
444 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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now