Re: Deleting files from O/S older than 6 hours

Ajay Thotangare wrote:
Hi,
I am using following command to delete files from o/s older than 24 hours.
/usr/bin/find /u01/log/*.log -mtime +0 -exec ls -l {} \;
Is there any way I can delete files older than 6 hours. I am using HP-UNIX. I tried using
/usr/bin/find /u01/log/*.log -mtime +0.4 -exec ls -l {} \;
Above command does not work.
may be there is option -newer on HP-UX (I don't have any such box here) - if so, one can touch fake file with proper time
Then find will operate on files newer than fake file

--

------------------------------------------------------------------------
Remigiusz Sokolowski <rems@xxxxxxxx>
WP/PTI/DIP/ZAB (+04858) 52 15 770
MySQL v04.x,05.x; Oracle v10.x

Zastrzezenia:
1. Wylaczenie danej funkcjonalnosci oznacza, ze niezwlocznie przystapimy
  lub juz pracujemy nad jej uruchomieniem
2. Niniejsza wiadomosc stanowi jedynie wyraz prywatnych pogladow autora i nie jest w zadnym wypadku zwiazana ze stanowiskiem przedsiebiorstwa Wirtualna Polska S.A.
------------------------------------------------------------------------



WIRTUALNA POLSKA SA, ul. Traugutta 115c, 80-226 Gdansk; NIP: 957-07-51-216; Sad Rejonowy Gdansk-Polnoc KRS 0000068548, kapital zakladowy 62.880.024 zlotych (w calosci wplacony)
--
http://www.freelists.org/webpage/oracle-l


Other related posts: