1753760 Members
4894 Online
108799 Solutions
New Discussion юеВ

HPUX commands

 
Soumya Poddar
Advisor

HPUX commands

sorry i again
have some problem in the HPUX

i want to find all the .c files in my current directory and subdirectories of it which are modified 30 miniutes ago

i tried that

find . -name "*.c" -mmin 30

but it did not work

i go through man page but there is no option like mmin in the find command int the HPUX

so how do i find all these files

please help

.......
8 REPLIES 8
Dennis Handly
Acclaimed Contributor

Re: HPUX commands

You need to create a reference file with touch(1), then you can use find(1):
touch -t MMDDhhmm ref_file
find . -name "*.c" -newer ref_file
Soumya Poddar
Advisor

Re: HPUX commands

thank you sir

i did that one

but is there any option is there in HPUX

so that i can have the list of files which are modified 30 min ago using find command only

please reply
Dennis Handly
Acclaimed Contributor

Re: HPUX commands

>so that I can have the list of files which are modified 30 min ago using find command only

Other than using GNU find or a perl script, no.
Soumya Poddar
Advisor

Re: HPUX commands

sir ...
i want to say that

the solution i have done
by creating a temp file using touch
and then we use find

but without creating this temp file using touch

using just the find can we solve that problem

please reply

thank you sir
Dennis Handly
Acclaimed Contributor

Re: HPUX commands

>using just the find can we solve that problem

If you want to just use a find, you can download GNU find and use that.
S.N.S
Valued Contributor

Re: HPUX commands

Wish HP-UX was as commands-flexible as Linux :-)...No other go Soumya...
"Genius is 1% inspiration, 99% Perspiration" - Edison
James R. Ferguson
Acclaimed Contributor

Re: HPUX commands

Hi:

Perl has a builtin 'find()' that allows you to do:

# perl -MFile::Find -le 'find(sub{print $File::Find::name if -f $_ && $_ =~/.+\.c$/ && -M _ < 1/48},".")'

This will traverse your current working directory looking for only files whose name's end in '.c' and have been modified during the last 30-minutes (that is, 1/48 of one day).

Regards!

...JRF...
Pete Randall
Outstanding Contributor

Re: HPUX commands