From: laredotornado on 10 May 2010 09:25 Hi, I'm using Mac 10.6.3. How can I configure find such that when I run the comand find . -name "*.txt" the "-follow" (follow symlinks) command is automatically included. I don't want to have to specify this command every time I run find, that is. Thanks, - Dave
From: pk on 10 May 2010 11:52 laredotornado(a)zipmail.com wrote: > Hi, > > I'm using Mac 10.6.3. How can I configure find such that when I run > the comand > > find . -name "*.txt" > > the "-follow" (follow symlinks) command is automatically included. I > don't want to have to specify this command every time I run find, that > is. You can use a wrapper function, or use -L if your find supports it and it's good enough for you.
From: laredotornado on 11 May 2010 09:52 On May 10, 10:52 am, pk <p...(a)pk.invalid> wrote: > laredotorn...(a)zipmail.com wrote: > > Hi, > > > I'm using Mac 10.6.3. How can I configure find such that when I run > > the comand > > > find . -name "*.txt" > > > the "-follow" (follow symlinks) command is automatically included. I > > don't want to have to specify this command every time I run find, that > > is. > > You can use a wrapper function, or use -L if your find supports it and it's > good enough for you. What do you mean a wrapper function? - Dave
From: pk on 11 May 2010 10:03 laredotornado wrote: > On May 10, 10:52 am, pk <p...(a)pk.invalid> wrote: >> laredotorn...(a)zipmail.com wrote: >> > Hi, >> >> > I'm using Mac 10.6.3. How can I configure find such that when I run >> > the comand >> >> > find . -name "*.txt" >> >> > the "-follow" (follow symlinks) command is automatically included. I >> > don't want to have to specify this command every time I run find, that >> > is. >> >> You can use a wrapper function, or use -L if your find supports it and >> it's good enough for you. > > What do you mean a wrapper function? - Dave Something like this (assuming you call it passing the base path as first argument): myfind () { path=$1 shift find "$path" -follow "$@" } myfind . -name "*.txt" or, perhaps easier and can be called with less constraints myfind () { find -L "$@" } myfind . -name "*.txt"
|
Pages: 1 Prev: Running a script through Automatic scheduler Next: Why it does not work? |