Regexp for general search.
Hello! I need to search for files written with windows word/noptepad etc. They are scattered all over five herddrives, and with mixed cases. (rtf, RTF, doc, DOC, Doc etc...) Is there a fast way to get a listing of all combinations of "windows generated" files? Sort of running a "find / -name "*.<whetever combination i can think of> " but doing it more elegant? :) -- /Rikard ----------------------------------------------------------------------------- email : rikard.j@rikjoh.com web : http://www.rikjoh.com mob: : +46 (0)763 19 76 25 ------------------------ Public PGP fingerprint ---------------------------- < 15 28 DF 78 67 98 B2 16 1F D3 FD C5 59 D4 B6 78 46 1C EE 56 >
On 07/05/06 12:58, Rikard Johnels wrote:
Hello! I need to search for files written with windows word/noptepad etc. They are scattered all over five herddrives, and with mixed cases. (rtf, RTF, doc, DOC, Doc etc...) Is there a fast way to get a listing of all combinations of "windows generated" files? Sort of running a "find / -name "*.<whetever combination i can think of> " but doing it more elegant? :)
for a in rtf doc (list continues); do find / -iname "*.$a"; done Note the use of "iname" which generates a case-insensitive search; then you only have to type in one variant of the filename extension. Need "real" elegance? Put it in a script (so you'll still have it when you have to run it again next month), and "tee" the output to a file ;-)
participants (2)
-
Darryl Gregorash
-
Rikard Johnels