11-21-2010
gzip files older than 1 months
Hello,
I want to gzip files in a folder in bulk i.e. all files older than 1 month should be in *.gz format. Could you please suggest how this can be achieved. Thanks.
Regards,
Alok
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
A script or command to list files older than 2 months in a specified directory and remove it. (3 Replies)
Discussion started by: pbekal
3 Replies
2. UNIX for Dummies Questions & Answers
How do I get the modification time for files less than 6 months old?
(It seems for fles as old or older than this I get to see only the day,month and year. I tried the option -u but it gives me the last accessed time) (1 Reply)
Discussion started by: Abhishek Ghose
1 Replies
3. UNIX for Dummies Questions & Answers
please help me with this????? :confused: :confused:
i need to create a program that will run in unix that will delete all files in a given directory that is at least 3 months old. first the program will need to automatically know what date it is right now to determine the files it will... (3 Replies)
Discussion started by: godalle
3 Replies
4. Shell Programming and Scripting
Guys,
My log files stored in the date format format below(log_20080714072942):
TIMESTAMP=`date +%Y%m%d%H%M%S`
LOG=/log/log_${TIMESTAMP}.log
I'm looking for a shell script which deletes all files which is older than 3 months from today.
Regards,
Bhagat (3 Replies)
Discussion started by: bhagat.singh-j
3 Replies
5. Shell Programming and Scripting
Hi,
Iam trying to delete 6 months old files.
Iam using the following script
-ctime +190 -type f -exec echo rm {} \;
Iam getting an error saying -ctime not found. (6 Replies)
Discussion started by: Sompalle Jalaja
6 Replies
6. Shell Programming and Scripting
Hi Viewer,
I need logic code for moving the logs files from one directory to another directory.
source :/xxxxxx/ xxxxxx / xxxxxx / xxxxxx / log --- under log directory we have so many files from last two years
Here I need to check the files older than two months and I need to move in... (5 Replies)
Discussion started by: munna_su
5 Replies
7. Shell Programming and Scripting
Hi Gurus
the count of files in a particular Directory...
ls -lrth | grep -c ^-
can any one share the command to Count the files which is Older than 3 months
So please help me out in this
Thanks in Advance (2 Replies)
Discussion started by: SeenuGuddu
2 Replies
8. UNIX and Linux Applications
Can anyone explain why Firefox 10 keeps losing history older than 2 months? (1 Reply)
Discussion started by: cokedude
1 Replies
9. Red Hat
ENVIROMENT
Linux: Fedora Core release 1 (Yarrow)
iPlanet: iPlanet-WebServer-Enterprise/6.0SP1
Log Path: /usr/iplanet/servers/https-company/logs
I have iPlanet log rotation enabled rotating files on a daily basis.
The rotated logs are NOT compressed & are taking up too much space.
I... (7 Replies)
Discussion started by: zachs
7 Replies
10. Shell Programming and Scripting
I have a qnap TS259 that is running ubuntu. Have successfully setup back scripts that are initiated by cron.
I would like to create a couple scrypts that would operate on the recycle bins for both drives. Just want to be able to run the script manually that would walk through both directories... (13 Replies)
Discussion started by: mackconsult
13 Replies
ZNEW(1) General Commands Manual ZNEW(1)
NAME
znew - recompress .Z files to .gz files
SYNOPSIS
znew [ -ftv9PK] [ name.Z ... ]
DESCRIPTION
Znew recompresses files from .Z (compress) format to .gz (gzip) format. If you want to recompress a file already in gzip format, rename
the file to force a .Z extension then apply znew.
OPTIONS
-f Force recompression from .Z to .gz format even if a .gz file already exists.
-t Tests the new files before deleting originals.
-v Verbose. Display the name and percentage reduction for each file compressed.
-9 Use the slowest compression method (optimal compression).
-P Use pipes for the conversion to reduce disk space usage.
-K Keep a .Z file when it is smaller than the .gz file
SEE ALSO
gzip(1), zmore(1), zdiff(1), zgrep(1), zforce(1), gzexe(1), compress(1)
BUGS
Znew does not maintain the time stamp with the -P option if cpmod(1) is not available and touch(1) does not support the -r option.
ZNEW(1)