Wildcard does not seem to work in exclude path provided to tmpwatch.
I have following dir structure inside /tmp
drwxr-xr-x 2 vrisbud developers 4096 May 17 15:36 AssetEnumeratorTest
drwxr-xr-x 2 vrisbud developers 4096 May 17 15:37 EnumeratorReducerTest
drwxr-xr-x 2 reco reco 4096 May 30 14:42 hadoop-reco
drwxr-xr-x 3 vrisbud developers 4096 May 17 15:30 hadoop-vrisbud
drwxr-xr-x 2 reco reco 4096 May 31 08:10 hsperfdata_reco
drwxr-xr-x 2 root root 4096 May 26 13:30 hsperfdata_root
I want to exclude the dir starting with 'hadoop' from tmpwatch. So I am executing the following command
tmpwatch -tmf 8 -x /tmp/hadoop* /tmp
It shows that it will delete 'hadoop-reco' and 'hadoop-vrisbud' directories. (I am just testing it so I have -t flag added to it.)
I also tried
tmpwatch -tmf 8 -x '/tmp/hadoop*' /tmp
tmpwatch -tmf 8 -x '/tmp/hadoop.*' /tmp
Nothing seems to work. I want to exclude directories starting with 'hadoop' from tmpwatch.
I am using tmpwatch 2.9.7
version if that makes any difference.
I would like to know how I can do it on my current version of tmpwatch. As an answer below indicates that I can use the -X option in the upgraded version of tmpwatch
, but I don't have this option available in my current version.