[NBLUG/talk] bash shell commands

JM jerome at gmanmi.tv
Wed Sep 3 05:13:00 PDT 2003


changing the value of IFS can help you...



On Wednesday 03 September 2003 08:14, Jeremy Turner wrote:
> On Fri, 2003-08-29 at 09:30, Andru Luvisi wrote:
> > On Linux you can use:
> >   rgrep 'someting' ./dir
> > or
> >   find ./dir -type f -print0 |xargs -0 grep 'something'
> >
> > -print0 and -0 are GNU extensions to find and xargs.  On systems with
> > non-GNU find and xargs you can use:
> >   find ./dir -type f -print |xargs grep 'something'
> >
> > ...but you may have problems with filenames that have spaces and newlines
> > in their names.
> >
> > Andru
>
> Another way to skin a cat:
>
> find ./dir -type f -print -exec grep 'something' \{\}\;
>
> Notice the -exec flag and the escaped {}; (necessary for the find
> command).
>
> This is helpful for making sure directory permissions are correct:
>
> chmod -R 644
> find ./dir -type d -print -exec chmod 755 \{\}\;
>
> Jeremy




More information about the talk mailing list