tag:blogger.com,1999:blog-6840603.post752118690571580018..comments2023-11-02T06:17:26.168-07:00Comments on Tom's Blog: To go through a directory of log files and delete them on unixTomhttp://www.blogger.com/profile/10954990997629429022noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-6840603.post-74201888652651471912007-03-17T16:18:00.000-07:002007-03-17T16:18:00.000-07:00Actualy -maxdepth option doesnt work on Unix.Those...Actualy -maxdepth option doesnt work on Unix.<BR/>Those are gnu find options, the find from Unix (lets say for instance AIX, Solaris) dont have that many options.<BR/>And although the are available on all the linux flavors you should not depend on those options to make your scripts more portable.feniixhttps://www.blogger.com/profile/02869175949797565100noreply@blogger.comtag:blogger.com,1999:blog-6840603.post-45085637984296194052007-03-01T17:29:00.000-08:002007-03-01T17:29:00.000-08:00Actually you don't need to script this...You can u...Actually you don't need to script this...<BR/><BR/>You can use the -exec option (you may also want to specify that you want only files)<BR/><BR/>find /home/evilsquid/logs -type f -maxdepth 1 -mtime -1 -name *.log -exec rm {} \;Anonymousnoreply@blogger.com