How to exclude directories?

I am using glimpse and I want to exclude search through some files. I am using the generic version of glimpse, so I cannot put the file ".glimpse_exclude" in this directory. I tried to put this file in my own local directory, but it did not work (maybe the answer to my question is more about where can I put this file so that glimpse can find it and use my local version?).

I see that there is "glimpse -W" a; ~ B ", which can exclude the expression (b in this case), but I want to exclude the directory, something like:

glimpse -F "~exclude/this/directory/" mysearchwords 

The best I have is to pass this through grep and use the grep exception functions:

 glimpse mysearchwords | grep -v "exclude/this/directory" 

My main problem is that it loses color coding, so itโ€™s a little harder to view the results.

In sum : what is the best way to exclude files for viewing, without using the .glimpse_exclude file and / or where I can place this file locally so that it is used when I run search queries, but will not affect the global glimpse command shared in my network?

+5
source share
1 answer

In glimpse 3.5, according to http://ftp.icm.edu.pl/packages/glimpse/CHANGES ,

3.0 โ†’ 3.5 - the option "-f filename" is added to see: this allows you to restrict the search to only those files whose names appear in "filename". - fixed agrep error where -n does not work with ISO characters.

+1
source

All Articles