On Sat, 30 Nov 2019 23:08:16 +0000 David Fleck <dcfl...@protonmail.ch> dijo:
>On Thursday, November 28, 2019 10:02 PM, John Jason Jordan ><joh...@gmx.com> wrote: >> >> I tried updatedb as jjj and with sudo and it did nothing much. It >> took about one second to complete. Clearly it is not updating the >> database for all files on all partitions. >> >> I think I found one solution - find with the --prune option. I'm >> trying to figure out the syntax to make it exclude the entire /media >> folder (because that's where everything but / and /home are >> mounted). I wish man pages would give examples of usage. > > >What about >find {all /-level dirs except /mnt} {other find options} >? >You could stick it into a tiny script or shell alias. After hours of trying to find an easy way to do what I wanted, I finally succeeded with the following find command: sudo find / -name "*.mount" -print -o -path '/media' -prune >~/find_mount_points.txt This command searches / for any file ending in .mount (you have to put it in quotes in you use a wildcard), -o = or, and the folder to prune must be in single quotes, and finally the result is sent to a text file in my home folder. It took about ten seconds to execute. I neglected to say beforehand what I was trying to find. I am still struggling to figure out how systemd decides what to mount and in what order. Apparently such things are kept in a file with the extension .mount, so that is what I was trying to find. Unfortunately, while my command worked without going into anything mounted in /media, it returned 146 files that end in .mount, of which 58 were located in folders containing 'systemd.' Find is a very powerful search tool, with options for just about anything. However, that makes it also incomprehensible. But the education was worth the time spent. And now that I have a find command that excludes /media I have saved it for use in the future when I need to find something that I know is not on any of my attached external drives. I only wish there was a way to save commands permanently in the GUI terminal - it would be faster and more convenient than having to open a text file of saved commands. _______________________________________________ PLUG mailing list PLUG@pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug