Tuesday 23 September 2014

Given a list of values, recursively go through subdirectories and find the matching files of a specific filename

Unix grep example:

fgrep -R -f sorted_untrusted_values_to_find.txt --include=".thisfile"

1. Given a list of values, contained in the file "sorted_unstrusted_values_to_find.txt", where each row has one value

-f sorted_untrusted_values_to_find.txt 

2. recursively traverse the subdirectories under our current location

 -R 

3. looking at the files named ".thisfile"

--include=".thisfile"

3. return the files that have a match



No comments: