The while loop seems to do the job, however I am now left with two or more outputs depending upon files found. For example when tested there were two files so grep was performed for both and output two values. Can these be summed up in the code?
Also this loop still takes the last files but not one minute ago. To clarify i am trying to achieve what Robin listed below:
Files timestamped as the previous minute to now (ie. if I'm at 12:53, I want all 12:52 files, even if they are 90 seconds old
---------- Post updated 07-07-16 at 12:01 PM ---------- Previous update was 07-06-16 at 06:34 PM ----------
Hi,
just found a dirty solution for this. copy the files based on date:
then do the required grep and delete files
Now the next step is to copy the files from one minute ago
Last edited by rbatte1; 07-07-2016 at 04:55 PM..
Reason: Added CODE tags.
Made changes to a file using vi editor and saved those changes
now realised that the changes are not required
How can I get the previous version of the file.i.e the one which was there on which I had made changes (3 Replies)
Hi All,
I have a requirement to find out the files which are modified in the last 10 minutes.
I tried the find command with -amin and -mmin options, but its not working on my AIX server.
Can anyone of you could help me.
Thanks in advance for your help.
Raju (3 Replies)
is it possible to come up with a list of files that are modified before a certain number of hours only using the grep command?
ex. list files that were modified less than 10 hours ago
i've only managed to list files that were created on the same day, i can't seem to figure out how to work... (3 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
is it possible to come up with a list of files that are modified before a certain number of hours only using the... (3 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Here is the question:
Make a list of files in your home directory that were changed less that 10 hours ago,... (3 Replies)
Hey guy's,
How can I schedule this script using AWK, what I require is it runs every minute as new data will be added to the file? And I need to capture these data and save it to the output file.
I tried using sleep 1 to allow the file to be processed but is not working.
awk '
... (35 Replies)
Hi, I've been trying to develop a script that performs the parsing of a log every 1 minute and then generating some statistics. I'm fairly new to programming and this is why I come to ask if I can lend a hand.
this is my log:
xxxx 16/04/2012 17:00:52 - xxxx714 - E234 - Time= 119 ms.... (8 Replies)
Hi,
How can I get files which are modified only in last minute ? it should not display 2 minutes back filels -la
-rw-rw-r-- 1 stuser st 51 Dec 3 09:22 a.csv
-rw-rw-r-- 1 stiser st 50 Dec 3 09:25 b.csv
-rw-rw-r-- 1 stuser st 53 Dec 3 09:33 c.csv
When I run command at 9:34am then I... (7 Replies)
Hi All,
Need your help on how i can sum up the values. I have a file that contains the count and the time. I wanted to add up all the first column having the same datestamp. Please see below.
INPUT
1721 2015-12-26 00:01
1440 2015-12-26 00:02
1477 2015-12-26 00:02
411 ... (4 Replies)
How to find a file that's modified more than 2 days ago but was modified less than 5 days ago by use of any Linux utility ? (4 Replies)
Discussion started by: abdulbadii
4 Replies
LEARN ABOUT V7
zgrep
ZGREP(1) General Commands Manual ZGREP(1)NAME
zgrep - search possibly compressed files for a regular expression
SYNOPSIS
zgrep [ grep_options ] [ -e ] pattern filename...
DESCRIPTION
Zgrep invokes grep on compressed or gzipped files. These grep options will cause zgrep to terminate with an error code:
(-[drRzZ]|--di*|--exc*|--inc*|--rec*|--nu*). All other options specified are passed directly to grep. If no file is specified, then the
standard input is decompressed if necessary and fed to grep. Otherwise the given files are uncompressed if necessary and fed to grep.
If the GREP environment variable is set, zgrep uses it as the grep program to be invoked.
EXIT CODE
2 - An option that is not supported was specified.
AUTHOR
Charles Levert (charles@comm.polymtl.ca)
SEE ALSO grep(1), gzexe(1), gzip(1), zdiff(1), zforce(1), zmore(1), znew(1)ZGREP(1)