unix - script for removing files that are 1 hour old -


this question has answer here:

i need shell script runs every half hour on cron , removes files extension (*.arc) 1 hour ,

old tried mtime has option days old not in terms of hours

it helpful if can command or logic can run on types of os meaning (hp-ux,linux,rhel etc)

edit:(some of servers in work environment have os dont have mmin option there work around)

can please tell how wud use tmpwatch or temreaper delete files (*.arc) older 1 hr

thank you

maybe can you

how delete files older x hours

seems wanting do!

edit!

maybe considerd kind of hack, maybe code this

touch -t 03061000 /tmp/datefile 

this supposed create file time stamp of march 6th 10:00

next can issue command

find . -newer /tmp/datefile -print 

to find files thare newer file , remove them.

hope helps!


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

angularjs - ng-repeat duplicating items after page reload -