Databases
cancel
Showing results for 
Search instead for 
Did you mean: 

How to gerp the time stamp of file creation date from remote box

Suman_7
Frequent Advisor

How to gerp the time stamp of file creation date from remote box

I am trying to gerp the time stamp of file creation from remote box. can get to the remote box by rexec command.

rexec -l ls -l //

It gives me the output

-rw-rw-r-- Apr 24 11:11 //

How can I grep the time stamp Apr 24 11:11 and get it in a parameter. I need to insert this values into the database.

Please suggest.

Thank You
Suman
3 REPLIES
Marvin Strong
Honored Contributor

Re: How to gerp the time stamp of file creation date from remote box

rexec host -l user ls -l /dir/file | awk '{print $6" "$7" "$8}'


might be an easier way but thats my way
Sanjay_6
Honored Contributor

Re: How to gerp the time stamp of file creation date from remote box

Hi,

Try

rexec -l ls -l // |awk '{print $6" "$7" "$8}'

Hope this helps.

Regds

Suman_7
Frequent Advisor

Re: How to gerp the time stamp of file creation date from remote box

Cool That works!!

Thanks Guys!!!

Suman