Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

How to select all files added to a directory in the past 5 mins (HP-UX)?

$
0
0
Hey everyone,

I need to select all files that were added to a specific directory in the past 5 mins and copy them over to a different directory. I am using HP-UX OS which does not have support for amin, cmin, and mmin. B/c of this, I am creating a temp file and will use the find -newer command to compare files to a temporary file with an altered timestamp (5 mins ago). HP-UX does not support the -d option for the 'touch' command so I cannot do something like this:

Code:

touch -d "5 mins ago" temp
Q: Does anyone know how I can select files added to the directory in the past 5 mins?

Any help would be greatly appreciated.

Thanks,
Matt

Viewing all articles
Browse latest Browse all 16232

Trending Articles