System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

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

 
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
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?

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


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