Grant Peel wrote:
Hi Justin, Thanks for the reply. FYI I am using UNIX (freebsd). Up tp this point, I have been using an sh script to rotate logs.The logs in question are the access_log and error_log in each one of my (Apache) virtual hosts.logrotate looks like the cats meow!I have read the man page and it states to use wildcards with caution (as always). So I have one question:Can I use a wildcard as such, /home/*/logs/access_log /home/*/logs/error_log The '*' being the wildcard to denote the home dir for virt_domain1.com virt_domain2.ca virt_domain3.net ... -Grant
Wildcards are fine. The man pages problem say to use them with caution to avoid matching more files than you really intend. The easiest way to be sure is just test the results of the wildcard with ls.
ls /home/*/logs/access_logIf the results are what you expect, then you are good to go. You can also combine the two log filenames in the same logrotate rule to avoid duplicating your settings.
Just keep in mind that with this setup, if a user has a file such as /home/username/logs/access_log, then it will be rotated too. However, if your setup doesn't allow users to create arbitrary directories/files like that, then there is no need to worry.
-- Justin Pasher --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx