Sponsored Content
Top Forums UNIX for Advanced & Expert Users Find files modified in previous minute only Post 302927499 by rbatte1 on Wednesday 3rd of December 2014 12:44:26 PM
Old 12-03-2014
One way would be to create a reference file with a timestamp to look back to. If you run it at 09:34 on 3rd December 2014, and you need to find files newer that 09:33:00 then you can (working out the values of course):-
Code:
touch -mt 201412030934 /tmp/ref_file
find . -newer /tmp/ref_file

The format value is in the manual page for the touch command.

If you need to include the seconds to get a more accurate 'previous minute' then simply add the seconds part, e.g.:-
Code:
touch -mt 201412030934.22 /tmp/ref_file
find . -newer /tmp/ref_file

If you have support for the -d flag, then you could do this:-
Code:
touch -md "1 minute ago" /tmp/ref_file
find . -newer /tmp/ref_file


I hope that this helps,
Robin
This User Gave Thanks to rbatte1 For This Post:
 

10 More Discussions You Might Find Interesting

1. HP-UX

find files modified in a specific month

hello i need a way to list files modified in a specific month and move them to a specific directry , i mean somthing like : find . -modifiedtime "May" -print -exec /usr/bin/mv newdirectory thank u (1 Reply)
Discussion started by: omer_ome
1 Replies

2. Solaris

find files modified in a specific month

hello i need a way to list files modified in a specific month and move them to a specific directry , i mean somthing like : find . -modifiedtime "May" -print -exec /usr/bin/mv newdirectory thank u (1 Reply)
Discussion started by: omer_ome
1 Replies

3. UNIX for Advanced & Expert Users

find files modified in a specific month

hello i need a way to list files modified in a specific month and move them to a specific directry , i mean somthing like : find . -modifiedtime "May" -print -exec /usr/bin/mv newdirectory thank u (1 Reply)
Discussion started by: omer_ome
1 Replies

4. Shell Programming and Scripting

find files modified more than a day

Hi All, I am using the below command to check the files modified within last 24hours find /home/karthik -mtime -1 -type f -exec ls -l {} \; What parameter do i need to add in the above command to check the files modified in last 2 or 3 days Kindly let me know if any other alternative... (2 Replies)
Discussion started by: karthikn7974
2 Replies

5. Shell Programming and Scripting

help: find and modified files script

hello all im a newbie in the linux world ..i have just started creating basic scripts in linux ..i am using rhel 5 ..the thing is i wanted to create a find script where i could find the last modified file and directory in the directory given as input by the user and storing the output in a file so... (6 Replies)
Discussion started by: tarunicon
6 Replies

6. UNIX for Dummies Questions & Answers

how to find the modified files before 60 mins?

hi, I need to find all the modified files before 60 minutes in a folder. Is that possible to find using mtime in minutes? Suggestions please. Thanks for looking into it... Geetha (8 Replies)
Discussion started by: iamgeethuj
8 Replies

7. UNIX for Dummies Questions & Answers

Find last modified date for many files

Hello all - I've looked and have not been able to find a "find" command that will list the last modified date of files within a specific directory and its subdirectories. If anyone knows of such a command it would be very much appreciated! If possible, I would like to sort this output and have... (5 Replies)
Discussion started by: MichaelH3947
5 Replies

8. Shell Programming and Scripting

Find files modified in last hour sunOS 5.10

trying to find a way to locate files modified in the last hour in a shell script, unfortunately the command 'find . -mmin -60' is not supported on SunOS 5.10 (works on OpenSolaris 5.11 :mad:) Does anyone know a method of doing this in shell script on 5.10? cheers (19 Replies)
Discussion started by: rich@ardz
19 Replies

9. Shell Programming and Scripting

Find list of files modified for a given day ?

find list of files modified for a given day ? if i have 10 files in my directory, i have modified only 5 ... how to display only modified files ? (1 Reply)
Discussion started by: only4satish
1 Replies

10. Shell Programming and Scripting

Grep from file modified one minute ago

Hello, I have a list of files, an example below: -rw-r--r-- 1 smf_oper esg 910773 Jul 6 12:52 am1slc02_ACS_201607061242571_20346.cdr -rw-r--r-- 1 smf_oper esg 995838 Jul 6 12:52 am1slc01_ACS_201607061243125_19895.cdr -rw-r--r-- 1 smf_oper esg 557235 Jul 6 12:52... (5 Replies)
Discussion started by: nms
5 Replies
LBCDCLIENT(1)							   User Commands						     LBCDCLIENT(1)

NAME
lbcdclient - Query a remote lbcd daemon for system load SYNOPSIS
lbcdclient [-2] [-s service[,service ...]] host ... DESCRIPTION
lbcdclient sends a query packet to a remote lbcd server and prints the results. The result output will look something like this: btime 1092858021 ctime 1092960298 utime 1092955199 load l1 96 l5 69 l15 57 total 0 unique 0 console 0 tmp full 0 P_tmpdir full 2 services 0 pads 0 0 service 0: weight 1 increment 1 btime is the time of the last system boot in seconds since epoch. ctime is the current system time in seconds since epoch. utime is the last modification time of the information about logged in users in seconds since epoch. The load line gives the one-minute (l1), five-minute (l5), and fifteen-minute (l15) load averages, multiplied by 100. The next line gives the count of logged-in users. total gives the count of all logged-in users, unique lists the total number of unique users, and console is 1 if a user is logged in to the console of the system. tmp full is the percentage used in the system /tmp directory and P_tmpdir full is the percentage full in the system /var/tmp directory. Finally, the last lines give information for each service, using the extended service response for the version three packet format. The first line gives the count of number of configured services minus one. (The pads numbers are reserved space in the packet and will gener- ally always be zero.) Then, each subsequent line lists the weights and increments for each service lbcd is monitoring on the system. If the -2 option is used, lbcdclient will send a version two packet instead, and the returned results will not include the services line and everything after that. OPTIONS
-2 Send a version two protocol packet instead of a version three packet. Version two doesn't support the separate service weights. -s service,[service ...] Request information for the specified service names. It's not entirely clear whether this works correctly. SEE ALSO
lbcd(8) The current version of this program is available from its web page at <http://www.eyrie.org/~eagle/software/lbcd/>. AUTHORS
Written by Larry Schwimmer. Currently maintained by Russ Allbery <rra@stanford.edu>. 3.3.0 2006-10-06 LBCDCLIENT(1)
All times are GMT -4. The time now is 01:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy