Hi, You may use the find command. find allows you to go through a directory tree and perform some tests and actions on it. For example, in your case you want something like
find / -path /mnt -prune -o -type f -exec grep "my exp" {} \; Here, the / means start in /, the '-path /mnt -prune' means if the path is of the form /mnt, don't go into it, the '-o' is a logical or, '-type f' means only regular files, and the -exec says what command to execute (the '{}' is replaced by the file name). find has many other option, all of which you can read about in man find. Note in particular the -mount option, which might be a simpler way to do what you want HTH Moshe * Anne Wilson <[EMAIL PROTECTED]> [020724 20:59]: > Is there a way of using grep to search for a word in all directories except > those under /mnt ? > > Anne > > Want to buy your Pack or Services from MandrakeSoft? > Go to http://www.mandrakestore.com
Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com