On Thu, Feb 13, 2014 at 13:36:49 +0000,
  Frank Murphy <frankl...@gmail.com> wrote:
On Thu, 13 Feb 2014 07:16:37 -0600
Bruno Wolff III <br...@wolff.to> wrote:

You coukd check which ones are owned by packages. rpm -qf will show
the package that owns a file or directory. You probably don't want to
delete those.

So I could run this every 6 month .
find ~/ -mtime 180 -type d -empty > empty.list \
&& rpm -qf $(cat empty.list)

To automate it you'd need to tweak the script. rpm -qf will tell you the package(s) that own the directories or warning messages for those that aren't owned. I don't know that it returns a status, so you'd probably want to pipe the output through grep and check its status. And you'd need to do this one file at a time.

Also note that using cat on a command line isn't going to work well for file names that have spaces in them. You'd probably want to use find's -exec test to run the final test script as that can hand off file names without having them parsed by the shell.
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org

Reply via email to