1827007 Members
2507 Online
109712 Solutions
New Discussion

Re: find linux versus HP

 
SOLVED
Go to solution
Gabriele FACCHINI
Frequent Advisor

find linux versus HP

Hi guys in Linux I use this command:
find /opt/antcvs/prod/log/exec/ -type f -name "*.log" -mtime -10 -printf %AY%Am%Ad\\040%AT\\040 print|sort
to obtain the follow output:
20041019 07:06:15 /opt/antcvs/prod/log/exec/OraBE/WEBLOGIC_DBA/CACE_DBA_20041006.log
20041019 07:07:16 /opt/antcvs/prod/log/exec/OraBE/WEBLOGIC_DBA/TEST_HR_PA_EXT_INT_20040922_1600.log
20041019 07:07:32 /opt/antcvs/prod/log/exec/OraBE/WEBLOGIC_DBA/TEST_HR_PA_EXT_INT_20041006_1300.log
20041019 07:13:24 /opt/antcvs/prod/log/exec/OraBE/WEBLOGIC_DBA/TEST_IB_20041014_1000.log

How commands can I use in HP-UX to obtain a list of file in this format?
Thanks a lot.
Facchini Gabriele
Gabriele Facchini
5 REPLIES 5
Patrick Wallek
Honored Contributor

Re: find linux versus HP

The closest you'll be able to get is:

find /opt/antcvs/prod/log/exec/ -type f -name "*.log" -mtime -10 -exec ll {} \;

Gabriele FACCHINI
Frequent Advisor

Re: find linux versus HP

I want a list in this format:
yyyymmdd HH:MM:SS absolute_path/file_name
es:
20041019 07:13:24 /opt/antcvs/prod/log/exec/OraBE/WEBLOGIC_DBA/TEST_IB_20041014_1000.log
Thanks
Facchini Gabriele
Gabriele Facchini
Rodney Hills
Honored Contributor
Solution

Re: find linux versus HP

The standard "find" does not -printf. You can get the gnu find from the porting and archive center. It has that ability.

http://hpux.cs.utah.edu/hppd/hpux/Gnu/findutils-4.1.5/

HTH

-- Rod Hills
There be dragons...
Gabriele FACCHINI
Frequent Advisor

Re: find linux versus HP

I try to download this utility.
Thanks for your help.
Facchini Gabriele
Gabriele Facchini
Gabriele FACCHINI
Frequent Advisor

Re: find linux versus HP

Now find work fine.
Thanks
Facchini Gabriele
Gabriele Facchini