2dc Subj : Re: grep question To : comp.os.linux From : staale Date : Tue Aug 31 2004 02:57 am Wiseguy wrote: > lzman@mindless.com (gnosis) tried to express: > >>How can I use grep to search every file on my computer for an expression? > > > as root > > find / -type f -print | xargs grep "expression" > > Warning! this will traverse NFS mounted directories too. You might want > to add -xdev to the find and search each individual mount point instead > of a complete root tree traversal. > > -wiseguy > If you have spaces (or other *nix unfrendly char) in file or folder names you better add -print0 and --null like this: find / -type f -print0|xargs --null grep "expression" MVH Staale . 0