Re: Empty directories no content for = 6mths
On Thu, Feb 13, 2014 at 08:46:19 +, Frank Murphy frankl...@gmail.com wrote: Looking at: find ~/ -mtime 180 -type d -empty Some empty dirs are important, so how to filter out those that may be needed. Would -mtime, cover for those that have had no content for = 6mths 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. -- 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
Re: Empty directories no content for = 6mths
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) Thanks Bruno ___ Regards Frank frankly3d.com -- 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
Re: Empty directories no content for = 6mths
On Thu, Feb 13, 2014 at 13:36:49 +, 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
Re: Empty directories no content for = 6mths
On 02/13/14 16:46, Frank Murphy wrote: Looking at: find ~/ -mtime 180 -type d -empty Some empty dirs are important, so how to filter out those that may be needed. Would -mtime, cover for those that have had no content for = 6mths Not sure what your question is 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. -- Getting tired of non-Fedora discussions and self-serving posts -- 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
Re: Empty directories no content for = 6mths
On Thu, 13 Feb 2014 22:00:10 +0800 Ed Greshko ed.gres...@greshko.com wrote: 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 do a lot of testing, and have noticed there can be extras in despite pkgs owning files\folders eg. yum install zikula ymu erase zikula updatedb ~$ locate zikula /etc/zikula /usr/share/zikula /usr/share/zikula/docs /usr/share/zikula/includes /usr/share/zikula/includes/classes /usr/share/zikula/includes/classes/SimplePie /usr/share/zikula/includes/classes/Smarty /usr/share/zikula/includes/classes/adodb /usr/share/zikula/includes/classes/php-gettext your left with bits of zikula thats just one than come to mind. ___ Regards Frank frankly3d.com -- 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
Re: Empty directories no content for = 6mths
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. -- 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
Re: Empty directories no content for = 6mths
On Thu, 13 Feb 2014 22:00:10 +0800 Ed Greshko ed.gres...@greshko.com wrote: find ~/ -mtime 180 -type d -empty Typo on my part find / -mtime 180 -type d -empty Maybe I could do it better as I don't require any tmpfs controlled dirs /proc etc.. ___ Regards Frank frankly3d.com -- 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
Re: Empty directories no content for = 6mths
On 02/13/14 22:21, Frank Murphy wrote: On Thu, 13 Feb 2014 22:00:10 +0800 Ed Greshko ed.gres...@greshko.com wrote: find ~/ -mtime 180 -type d -empty Typo on my part find / -mtime 180 -type d -empty Maybe I could do it better as I don't require any tmpfs controlled dirs /proc etc.. OK I suppose that makes a bit more sense. But, what you're doing is just looking for empty directories that may be laying around after installing and then erasing some packages? Is that the objective? -- Getting tired of non-Fedora discussions and self-serving posts -- 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
Re: Empty directories no content for = 6mths
On 02/13/2014 07:40 PM, Frank Murphy wrote: On Thu, 13 Feb 2014 22:00:10 +0800 Ed Greshko ed.gres...@greshko.com wrote: 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 do a lot of testing, and have noticed there can be extras in despite pkgs owning files\folders eg. yum install zikula ymu erase zikula updatedb ~$ locate zikula /etc/zikula /usr/share/zikula /usr/share/zikula/docs /usr/share/zikula/includes /usr/share/zikula/includes/classes /usr/share/zikula/includes/classes/SimplePie /usr/share/zikula/includes/classes/Smarty /usr/share/zikula/includes/classes/adodb /usr/share/zikula/includes/classes/php-gettext your left with bits of zikula thats just one than come to mind. Since the package has been removed, the rpm -qf on those files will return 'file path is not owned by any package', and so you could probably remove those non-empty directories safely as well. But the catch is that rpm -qf on user data directories/files will also give the same output. So how would you distinguish between them ? - Rejy (rmc) -- 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
Re: Empty directories no content for = 6mths
On Thu, 13 Feb 2014 22:32:52 +0800 Ed Greshko ed.gres...@greshko.com wrote: But, what you're doing is just looking for empty directories that may be laying around after installing and then erasing some packages? Is that the objective? Plus many other I forget to remove myself. They can build up over the years. ___ Regards Frank frankly3d.com -- 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
Re: Empty directories no content for = 6mths
On Thu, 13 Feb 2014 20:10:50 +0530 Rejy M Cyriac rcyr...@redhat.com wrote: your left with bits of zikula thats just one than come to mind. Since the package has been removed, the rpm -qf on those files will return 'file path is not owned by any package', and so you could probably remove those non-empty directories safely as well. But the catch is that rpm -qf on user data directories/files will also give the same output. So how would you distinguish between them ? - Rejy (rmc) As I'm the only user if empty they can go. Just to find them. ___ Regards Frank frankly3d.com -- 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
Re: Empty directories no content for = 6mths
On Thu, 13 Feb 2014 14:10:46 +, Frank Murphy wrote: I do a lot of testing, and have noticed there can be extras in despite pkgs owning files\folders eg. yum install zikula ymu erase zikula typo here? updatedb ~$ locate zikula /etc/zikula /usr/share/zikula /usr/share/zikula/docs /usr/share/zikula/includes /usr/share/zikula/includes/classes /usr/share/zikula/includes/classes/SimplePie /usr/share/zikula/includes/classes/Smarty /usr/share/zikula/includes/classes/adodb /usr/share/zikula/includes/classes/php-gettext your left with bits of zikula thats just one than come to mind. If verified with rpm -qf … and rpmls … and no other installed package includes those directories either, that would be a packaging mistake and should be reported in bugzilla. A so-called unowned directory, i.e. a directory entry missing in the package's spec file %files list(s). However, when looking up http://pkgs.fedoraproject.org/cgit/zikula.git/plain/zikula.spec I find %files %defattr(-,root,root,-) %doc docs/* %{_datadir}/%{name} and the last line includes /usr/share/zikula and everything in it, so no idea what package version you refer to. -- 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
Re: Empty directories no content for = 6mths
On Thu, 13 Feb 2014 17:33:55 +0100 Michael Schwendt mschwe...@gmail.com wrote: On Thu, 13 Feb 2014 14:10:46 +, Frank Murphy wrote: I do a lot of testing, and have noticed there can be extras in despite pkgs owning files\folders eg. yum install zikula ymu erase zikula typo here? I have an alias for it. updatedb ~$ locate zikula /etc/zikula /usr/share/zikula /usr/share/zikula/docs /usr/share/zikula/includes /usr/share/zikula/includes/classes /usr/share/zikula/includes/classes/SimplePie /usr/share/zikula/includes/classes/Smarty /usr/share/zikula/includes/classes/adodb /usr/share/zikula/includes/classes/php-gettext your left with bits of zikula thats just one than come to mind. If verified with rpm -qf … and rpmls … and no other installed package includes those directories either, that would be a packaging mistake and should be reported in bugzilla. A so-called unowned directory, i.e. a directory entry missing in the package's spec file %files list(s). However, when looking up http://pkgs.fedoraproject.org/cgit/zikula.git/plain/zikula.spec I find %files %defattr(-,root,root,-) %doc docs/* %{_datadir}/%{name} and the last line includes /usr/share/zikula and everything in it, so no idea what package version you refer to. yum install --releasever=20 zikula # I'm on F20 but just to be sure. installing below: http://fpaste.org/76965/ # updatedb locate zikula: http://fpaste.org/76969/ yum erase zikula -y http://fpaste.org/76972/12020139/ # updatedb locate zikula /etc/zikula /usr/share/zikula /usr/share/zikula/docs /usr/share/zikula/includes /usr/share/zikula/includes/classes /usr/share/zikula/includes/classes/SimplePie /usr/share/zikula/includes/classes/Smarty /usr/share/zikula/includes/classes/adodb /usr/share/zikula/includes/classes/php-gettext /var/cache/yum/x86_64/20/fedora/packages/zikula-1.2.3-5.fc19.noarch.rpm /var/lib/yum/plugins/local/20/zikula-1.2.3-5.fc19.noarch.rpm ___ Regards Frank frankly3d.com -- 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
Re: Empty directories no content for = 6mths
On Thu, 13 Feb 2014 17:21:51 +, Frank Murphy wrote: yum install --releasever=20 zikula # I'm on F20 but just to be sure. installing below: http://fpaste.org/76965/ # updatedb locate zikula: http://fpaste.org/76969/ $ yum -y install zikula … $ rpm -qf /usr/share/zikula /usr/share/zikula/*|uniq -c 4 zikula-1.2.3-5.fc19.noarch 1 file /usr/share/zikula/docs is not owned by any package 19 zikula-1.2.3-5.fc19.noarch That's a packaging mistake. If /usr/share/zikula/docs is left behind, RPM cannot remove the parent dir. Same here. Symlinks in there, which don't get removed, and that blocks all parent dirs: # rpm -qf /usr/share/zikula/includes/classes/* file /usr/share/zikula/includes/classes/adodb is not owned by any package file /usr/share/zikula/includes/classes/php-gettext is not owned by any package file /usr/share/zikula/includes/classes/SimplePie is not owned by any package file /usr/share/zikula/includes/classes/Smarty is not owned by any package - http://bugz.fedoraproject.org/zikula -- 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