Out of a list of files in a directory, I want to find the files which were created/modified more than 1 hour ago. I am using HP -UNIX and it does not support the argument -mmin. Please advise.
I am using # !/bin/sh
Below timestamp corresponds to YYMMDDHHMM, please adjust it for your requirement; if required, YYYYMMDDHHMMSS should work too (see man touch).
(Alternatively, you could use a reference file to take its timestamp, e.g. touch -r /path/to/reffile /tmp/newer)
Make sure you "update" your /tmp/newer file accordingly if you run find again at a later date.
The problem is I cannot hardcode the timestamp for the temp file. Since this is a script which will run every 1 hour, I want to pick only those files which were created one hour before the current timestamp.
Hi Gurus,
I want to find the file created within one hour in solaris.
I have tried below command, but it is no lucky.
$find . -mtime -1/24, -name "abc*"
above command give me the file name which created two hours ago
find . -cmin -60, -name "abc*"
above command I got error as... (4 Replies)
HP Unix Version: HP-UX B.11.31 U ia64
Question
I look for script or command to find files which are older than one hour.
Tried below;
# set the file time to 1 hours ago
touch -t 201307160700 ./touchfile
find /app/grid/product/11.2.0.3/rdbms/audit -name '*.aud' -type f ! -newer... (4 Replies)
Hello All,
Can someone please help me out in creating the find command to search and delete files older than 1 days at a desired location.
Thanks in advance for your help. (3 Replies)
Hi
I need to find the list of files in a directory and to do some specific operations based on the type of files.
suppose in a directory am having .dat , .log, .err, .rej file types. i need to filter out .dat and .log only which are older than six months.
i used the below query but the... (2 Replies)
Hi All,
I want to find files which are older than 15 days.
I have written a command as below,
find -mtime +15 -print
I understand (System date - last modified time of a file) should be greater than or equal to 15 days.
This command returns files which are 15 days old..
i.e... (1 Reply)
I need to write a script to find files older than 2 hours in set of direcotries and list them ina mail. I know find command ti list files greater/lesser than days but i need to do it for hours. Any input. (6 Replies)
Hi,
I have some files in a folder with different time stamps and
I want to display the files which are older than 1 hour.
i tried with find.
need urgent help. (7 Replies)
Hi,
I have some files in a folder with different time stamps and
I want to display the files which are older than 1 hour.
i tried with find.
need urgent help. (3 Replies)
I need to find files that have the ending of .out and that are older than 20 days. However, I cannot use find as I do not want to search in the directories that are underneath the directory that I am searching in.
How can this be done?? Find returns files that I do not want. (2 Replies)