life ideas

September 29, 2006

script to delete files

Filed under: script, Uncategorized — manoftoday @ 7:50 pm

bash-2.05b$ more /usr/lib/sa/sa2

find /var/log/sa \( -name ‘sar??’ -o -name ‘sa??’ \) -mtime +7 -exec rm -f {} \;

find files with name sa??  or sar?? in directory /var/log/sa with modified time older

than 7 days and then delete

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: