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 ;-)