Operating System - HP-UX
1748219 Members
4806 Online
108759 Solutions
New Discussion

How to Zip the .gz files to free space in /var ?

 
redhat7012
Advisor

How to Zip the .gz files to free space in /var ?

Hi,

 

How to zip log.gz files ?

 

These files are taki ng lot of space on /var filesystem and /var has reached 90%.

 

Kindly let me know the command to compress .gz files..

 

Regards,

Aparna.

 

 

3 REPLIES 3
Dennis Handly
Acclaimed Contributor

Re: How to Zip the .gz files to free space in /var ?

>let me know the command to compress .gz files.

 

These files have already been gzipped.  I doubt you can make them much smaller, unless you use an option to change the compression level.  It will be CPU intensive.

 

Why not move the files to storage?

pradeep m
Respected Contributor

Re: How to Zip the .gz files to free space in /var ?

You can also use the below command to find the 10 largest files in the /var filesystem and move it to free up space under /var.

 

# find /var -type f -xdev -print | xargs -e ll | sort -rn -k5 | head -n 10

Regards,
Pradeep

I am an HP Employee
A quick resolution to technical issues for your HP Enterprise products is just a click away HP Support Center Knowledge-base
See Self Help Post for more details


Dennis Handly
Acclaimed Contributor

Re: How to Zip the .gz files to free space in /var ?

In this case, there is no need to use xargs with find:

find /var -type f -xdev -exec ll {} + | sort -rn -k5 | head -n 10