Hi Team,
I'm new to unix and i have a requirement to copy or move files from one directory to another based on current date mentioned in the .zip file name. Note that i need to copy only the recent zip file. please help me with the code
i tried the code as:
But, this gives only if the file is found or not but i need to copy as well if zip file is found.
Data :
Moderator's Comments:
edit by bakunin: please use CODE-tags for code, data and terminal output. Thank you.
I am a newbie to scripting.
I need a korn shell script to copy log files of current day to archive folder and rename with current days date stamp.
I would really appreciate your help.
File structure is as follows. Everyday files get overwritten, so I need copy to a archive directory and... (3 Replies)
Hi All,
PFB is a requirement. I am new to shell scripting. So plz help. It would be highly appreciated.
1. choose all the log files based on a particular date (files location is '/test/domain')--i.e,we should choose all the files that are modified on 29th November, neither 28th nor 30th
2.... (3 Replies)
Hi All,
I am new to shell srcipting.
Problem :
I need to write a script which copy the log files from /prod/logs directory based on todays date like (Jul 17) and place it to /home/hzjnr0 directory and then search the copied logfiles for the string "@ending successfully on Thu Jul 17". If... (2 Replies)
I'm having problems with my bash script. I would like to find a file matching today's date in the filename, i.e. my_file_20120902.txt and then move it to a different directory, i.e. /tmp. Thanks. (1 Reply)
I was wondering the best way about finding files that were created today and copy them to a directory (grep ?). There can be multiple files for todays date or none. I am looking to copy all of the .lis files for todays date. I may need to modify the filename to include todays date but for the... (4 Replies)
Hi,
We've a list of files that gets created on a weekly basis and it has got a date and time embedded to it. Below are the examples. I want to find out how to get the latest files get the date and time stamp out of it.
Files are
PQR123.PLL.M989898.201308012254.gpg... (1 Reply)
I have bunch of files in my source folder like below and every day based on date I am receiving file ex: Nov 28,Nov 29,Nov 30 ...
-rw-rw-r--+ 1 root root 20 Nov 27 06:00 aaaa27.txt
-rw-rw-r--+ 1 root root 20 Nov 28 06:00 aaaa28.txt
-rw-rw-r--+ 1 root root 20 Nov 29 06:00 aaaa29.txt
I... (4 Replies)
Hi All,
Solaris 10 o/s
With your help I developed the following script.
find /oracle/diag/rdbms/*/*/trace -type f -name '*d00*.trc' -mtime 0 -exec egrep –c 'NS Primary Error' '{}' '+'
which returns the counts I needed nelow:
/oracle/diag/rdbms/musidp/musidp/trace/abcdef_d001_21751.trc:15... (9 Replies)
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)
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
LEARN ABOUT MOJAVE
zipdetails
ZIPDETAILS(1) Perl Programmers Reference Guide 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 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 IO::Compress::Zip, IO::Uncompress::Unzip.
AUTHOR
Paul Marquess pmqs@cpan.org.
COPYRIGHT
Copyright (c) 2011-2012 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.18.2 2018-08-17 ZIPDETAILS(1)