Empty directories no content for >= 6mths

Bruno Wolff III bruno at wolff.to
Thu Feb 13 14:17:03 UTC 2014


>
>Isn't
>
>find ~/ -mtime 180 -type d -empty
>
>equivalent to
>
>find $HOME/ -mtime 180 -type d -empty  ??
>
>I don't see any files below a user's $HOME belonging to any packages....  So, I don't really understand the objective.

I missed that he was only looking under home. There wouldn't be anything there 
owned by packages. Some directories would be created from /etc/skel when 
the account is created. (I think stuff from something under /usr/local/ 
is also picked up if it exists.) Any directories there should probably be 
kept even if they are empty.

Most programs that need config directories will create their own. However 
if some subdirectories are deleted, I am not sure those would be relibably 
recreated when needed if the top level config directory is present.

I guess it might be best to manually look at the list of empty directories 
to see which ones are being created that can be removed. If there is a 
pattern to the names of ones that can be safely deleted and that seem 
to be regularly being created, then perhaps the script could just 
automatically delete those directories instead of any empty directory.


More information about the users mailing list