I'm trying to use locate to find any files on my system that contain the word 'Jaynes'. Unfortunately there's a symbolic link called Jaynes that points to a directory. I want to exclude all symbolic links and directories from my locate search. Obviously, I can do this with find
but it's slower.
To be specific, the output from this command in my bash script
ls -al `/usr/bin/locate -i Jaynes`
is
-rw-r--r-- 1 simon simon 80 Aug 10 2016 /home/simon/LOCALSVN/ward/trunk/literature/Jaynes/JaynesBook.html
lrwxrwxrwx 1 simon simon 49 Oct 24 2016 /home/simon/research/Monash/Ward/literature/Jaynes -> /home/simon/LOCALSVN/ward/trunk/literature/Jaynes
/home/simon/LOCALSVN/ward/trunk/literature/Jaynes:
total 1352
drwxr-xr-x 2 simon simon 4096 Aug 10 2016 .
drwxr-xr-x 6 simon simon 4096 Oct 21 2016 ..
-rw-r--r-- 1 simon simon 80 Aug 10 2016 JaynesBook.html
What I'm trying to do is eliminate the reference to the symbolic link (the second line) and also to the lines below which follow the symbolic link, leaving only the first line, which is a real file.
Thanks very much for any advice