04-06-2009
Zip files by date
Hello,
I need to create a bash script file that zip files.
The obj is : the script enter into a directory, see all directories, and zip the files by date ( the script is for managment of logfiles ), exemple: in the directory there is just files following the name "ex090210" (yymmdd ), so i need the script reads "*0902*" create a zip with that name and everything that have *0902* goes into the zip, so script will zip files by month, and do that recursivelly.
Tks for the atention.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I need to zip the list of files using from date Stamp to end date Stamp, How can I filter and make FromDate_EndDate.gzip?
any idea? (1 Reply)
Discussion started by: redlotus72
1 Replies
2. UNIX for Dummies Questions & Answers
Hello,
I am trying to return the name of the resulting file from a .zip archive file using unix unzip command.
unzip c07212007.cef7081.zip
Archive: c07212007.cef7081.zip
SecureZIP for z/OS by PKWARE
inflating: CEP/CEM7080/PPVBILL/PASS/G0063V00
I used the following command to unzip in... (5 Replies)
Discussion started by: oracledev
5 Replies
3. Shell Programming and Scripting
Hi all,
this is my first post, i need to write a script to zip the files with datewise below are the log files.
-rw------- 1 root sso 85316156 May 24 22:11 core_test_smservaz_104_104_1243217459_8896
-rw------- 1 root sso 90413304 May 25 22:12 core_test_smservaz_104_104_1243303895_20912... (4 Replies)
Discussion started by: lcschandu
4 Replies
4. AIX
I have to zip many pdf files and the size of zip file must not exceed 200 MB. When size is more than 200 MB then multiple zip files needs to be created.
How we can achieve this in UNIX?
I have tried ZIP utility but it takes a lot of time when we add individual pdfs by looping through a... (1 Reply)
Discussion started by: tom007
1 Replies
5. Shell Programming and Scripting
Hi all,
I am using the below script which display the files in the folder with the date range we specify. I want to add extra functionality that,
The listing files should be zipped using gzip. I tried to add exec gzip at the last line but it is not working.
Suggestions please.
... (2 Replies)
Discussion started by: nokiak810
2 Replies
6. Shell Programming and Scripting
Hi
I have a requirement in unix shell where I need to zip multiple files on server to one single .zip file. I dont see zip command in AIX and gzip command not doing completely what I want.
One I do .zip file, I should be able to unzip in my local Computer.
Here is example what I want... (9 Replies)
Discussion started by: RAMA PULI
9 Replies
7. UNIX for Beginners Questions & Answers
Hi all i am very new to shell scripting and need some help from you to learn
1)i have some log files that gets generated on daily basis example: i have abc_2017_01_30_1.log ,2017_01_30_2.log like wise so i want to zip this 4 logs which are created on same date into one zip folder.
2)Post zipping... (2 Replies)
Discussion started by: b.saipriyanka
2 Replies
8. Shell Programming and Scripting
Hi all i am very new to shell scripting and need some help from you to learn
1)i have some log files that gets generated on daily basis example: i have abc_2017_01_30_1.log ,2017_01_30_2.log like wise so i want to zip this 4 logs which are created on same date into one zip folder.
2)Post zipping... (1 Reply)
Discussion started by: b.saipriyanka
1 Replies
9. Shell Programming and Scripting
Hi,
I'm an absolute beginner in shell programming.
I would need a script for a NAS that makes the csv files sorted by date and always monthly a zip.
In the current month, the data should be integrated into this folder, so there are only monthly files.
Thanks for your help (1 Reply)
Discussion started by: Pipo
1 Replies
10. Shell Programming and Scripting
Hi All,
OS: Redhat Linux 7.5
Shell: Bash
I have some folder like this
2018-09-16
2018-09-17
2018-09-18
2018-09-19 and so on...
Everyday one script create a folder with pattern YYYY-MM-DD (it will have so many sub directories files in it)
Now what I would like to achieve is a... (1 Reply)
Discussion started by: onenessboy
1 Replies
LEARN ABOUT CENTOS
zipdetails
ZIPDETAILS(1) User Contributed Perl Documentation ZIPDETAILS(1)
NAME
zipdetails - display the internal structure of zip files
SYNOPSIS
zipdetaile [-v] zipfile.zip
zipdetails -h
DESCRIPTION
Zipdetails displays information about the internal record structure of the zip file. It is not concerned with displaying any details of the
compressed data stored in the zip file.
The program assumes prior understanding of the internal structure of a Zip file. You should have a copy of the Zip APPNOTE file at hand to
help understand the output from this program ("SEE ALSO" for details).
OPTIONS
-v Enable Verbose mode
-h Display help
By default zipdetails will output the details of the zip file in three columns.
Column 1
This contains the offset from the start of the file in hex.
Column 2
This contains a textual description of the field.
Column 3
If the field contains a numeric value it will be displayed in hex. Zip stored most numbers in little-endian format - the value
displayed will have the little-endian encoding removed.
Next, is an optional description of what the value means.
If the "-v" option is present, column 1 is expanded to include
o The offset from the start of the file in hex.
o The length of the filed in hex.
o A hex dump of the bytes in field in the order they are stored in the zip file.
TODO
Error handling is still a work in progress. If the program encounters a problem reading a zip file it is likely to terminate with an
unhelpful error message.
SEE ALSO
The primary reference for Zip files is the "appnote" document available at <http://www.pkware.com/documents/casestudies/APPNOTE.TXT>.
An alternative reference is the Info-Zip appnote. This is available from <ftp://ftp.info-zip.org/pub/infozip/doc/>
The "zipinfo" program that comes with the info-zip distribution (<http://www.info-zip.org/>) can also display details of the structure of a
zip file.
See also Archive::Zip::SimpleZip, IO::Compress::Zip, IO::Uncompress::Unzip.
AUTHOR
Paul Marquess pmqs@cpan.org.
COPYRIGHT
Copyright (c) 2011-2013 Paul Marquess. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.16.3 2013-01-09 ZIPDETAILS(1)