Sponsored Content
Top Forums Shell Programming and Scripting Identify log files based on time stamp,zip and then copy..HELP Post 302472654 by Chubler_XL on Wednesday 17th of November 2010 06:34:15 PM
Old 11-17-2010
here is a ksh script that uses awk and gzip (this will give a GNU zip file not pkzip). Do you have a pkzip program installed on your UNIX environ? If you are on solaris you may have the /usr/local/zip command.

backup_domain.sh
Code:
#/bin/ksh
month=$1
day=$2
cd /test/domain
files=`ls -l . |  awk ' $1 ~ /^[^d]/ && tolower($6$7) ~ /'${month}${day}'/ { print $9 }'`
[ -n "$files" ] && cat $files | gzip -9c > backup_log/`date +%Y_%m_%d`.log.gz

Call it like this

Code:
$ backup_domain.sh nov 29

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to Zip the files from date Stamp to end date Stamp

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

Need to delete the files based on the time stamp of the file

Hi Everyone, I want to delete some files in a path based on the time stamp of the file that is i want to delete the file once in a month. Can any one help me on this? Thanks in advance (2 Replies)
Discussion started by: samudha
2 Replies

3. UNIX for Dummies Questions & Answers

Copy all the files with time stamp and remove header,trailer from file

All, I am new to unix and i have the following requirement. I have file(s) landing into input directory with timestamp, first i want to copy all these files into seperate directory then i want to rename these files without timestamp and also remove header,trailer from that file.. Could... (35 Replies)
Discussion started by: ksrams
35 Replies

4. UNIX for Dummies Questions & Answers

How to search for files based on the time stamp

Hi All, I know the timestamp of a file. Now i would like to list all the files in the with the same time stamp in the same file. Any help would be appreciated. Thanks. sunny (1 Reply)
Discussion started by: sunny_03
1 Replies

5. Shell Programming and Scripting

how to copy an alertlog file from a particular time stamp?

Hi, Can any one tell me how to copy an alertlog file from a particular time stamp using shell script? Thanks (3 Replies)
Discussion started by: suman_dba1
3 Replies

6. Fedora

Move file based time stamp

Hi all, I've already tired to try to solved this problem. Also search in Internet didn't find anything solution I have a directory like this : # pwd /opt/projects/juventini # ls -al | more total 3627460 drwxr-xr-x 2 app apps 12472320 Sep 24 14:59 . drwxr-xr-x 11 app apps 4096 Jun... (8 Replies)
Discussion started by: sunardo
8 Replies

7. Programming

How to search a file based on a time stamp backwards 10 seconds

Hi all, I'm after some help with this small issue which i'm struggling to work out a fix for. I have a file that contains records that all have a time stamp for each individual record, i need to search the file for a specific time stamp and then search back 10 seconds to see if the number... (2 Replies)
Discussion started by: sp3arsy
2 Replies

8. Shell Programming and Scripting

Need Time Stamp Range On Log Files

I have created this script #!/bin/sh FILES=/data/log/access_*.log for f in $FILES do echo "Processing $f file" cat $f | awk '{print $1}' | sort | uniq -c | sort -n | tail done It produces this output Processing /data/log/access_abc.log file 114 1.1.1.1 167 2.2.2.2 ... (38 Replies)
Discussion started by: sharingsunshine
38 Replies

9. Shell Programming and Scripting

Search Files on a given path based on latest time stamp

find /app/data -name "Availability" - Below is the output now i need to filter based on latest modified timestamp. I know 3 is the latest modified time stamp but i tried different options but only filtering docs and not on headnote..Can any one tell me how to do that.. ... (2 Replies)
Discussion started by: vkiyv05
2 Replies

10. UNIX for Beginners Questions & Answers

Find and copy .zip file based on today's date

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: #! /usr/bin/sh find... (3 Replies)
Discussion started by: midhun3108
3 Replies
TRUSTEDQSL(5)							File Formats Manual						     TRUSTEDQSL(5)

NAME
TrustedQSL - digitally sign amateur radio contact logs SYNOPSIS
tqslcert [certificate-file]... tqsl [OPTIONS] [log-file]... DESCRIPTION
TrustedQSL is a file format and set of procedures that is used to send digitally signed QSL information (logs of contacts between amateur radio operators). One notable service that makes use of TrustedQSL is ARRL's Logbook of the World. The tqslcert program is used to generate requests for digital certificates and to store the resulting received digital certificates. The tqsl program is used to digitally sign contact log files using a digital certificate. This manual page briefly documents the tqslcert and tqsl programs. Complete documentation is also available: tqslcert: file:///usr/share/TrustedQSL/help/tqslcert/main.htm tqsl: file:///usr/share/TrustedQSL/help/tqslapp/main.htm OPTIONS
tqslcert accepts TQSL certificate files which may optionally be specified on the command line. tqsl accepts these command line options: -d Suppress date-range dialog. If present, the QSO date-range dialog will not be shown for files that follow this option on the command line. -l location_name Selects an existing station location. This location will be used for the commands that follow. If the station location doesn't exist, tqsl will just exit. -o output_file Writes the resulting signed log file to output_file instead of a default name based on the input log-file name. -s Add or edit station location. If there is a preceding -l option the specified location will be edited. If there is no preceding -l option, a new station location is being added. -x (or) -q Exit tqsl. If this argument is used it should be the last one on the command line. If this argument is not present, tqsl will begin normal operation after successfully processing all command-line arguments. log-files Any command-line parameter that is not an option or an option's argument will be treated as the name of a log file (ADIF or Cabrillo) to be signed. The resulting signed file (.tq8) will be placed in the same directory as the log file, overwriting any existing .tq8 file of the same name. (Note: If this option is not preceded by a -l option that selects the station location to be used for signing, the Select Station Location for Signing dialog will be presented.) File names that contain spaces or other shell- special characters should be quoted in a manner suitable for the operating system and shell that's being used. N.B.: If the private key needed to sign a log is protected by a password, the user will be prompted to supply that password for each file being signed. AUTHOR
trustedqsl was written by "American Radio Relay League, Inc.". This manual page was prepared by Kamal Mostafa <kamal@whence.com>, for the Debian project (and may be used by others). March 31, 2011 TRUSTEDQSL(5)
All times are GMT -4. The time now is 12:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy