On Tue, Dec 29, 2009 at 08:07:35PM -0500, Steve Bertrand wrote:
> Glen Barber wrote:
> > Hi Steve
> >
> > On Tue, Dec 29, 2009 at 7:50 PM, Steve Bertrand wrote:
> >> Hi all, happy holidays!
> >>
> >> I want to add an alias to my .cshrc file:
> >>
> >> alias srm find . -name "*~" | xargs rm
> >
On Tue, Dec 29, 2009 at 07:50:21PM -0500, Steve Bertrand wrote:
> Hi all, happy holidays!
>
> I want to add an alias to my .cshrc file:
>
> alias srm find . -name "*~" | xargs rm
>
Your problem is quoting the command. It has multiple parts
with white space, so it all needs to be quoted. So
On Tue, Dec 29, 2009 at 07:50:21PM -0500, Steve Bertrand wrote:
> I want to add an alias to my .cshrc file:
>
> alias srm find . -name "*~" | xargs rm
No need for xargs:
alias srm "find . -name '*~' -exec rm {} +"
or
alias srm "find . -name '*~' -delete"
> ...so that I have an easy way
Glen Barber wrote:
> Hi Steve
>
> On Tue, Dec 29, 2009 at 7:50 PM, Steve Bertrand wrote:
>> Hi all, happy holidays!
>>
>> I want to add an alias to my .cshrc file:
>>
>> alias srm find . -name "*~" | xargs rm
>>
>
> Try enclosing it in quotes, such as:
>
>alias srm "find . -name \"*~\" |
Hi Steve
On Tue, Dec 29, 2009 at 7:50 PM, Steve Bertrand wrote:
> Hi all, happy holidays!
>
> I want to add an alias to my .cshrc file:
>
> alias srm find . -name "*~" | xargs rm
>
Try enclosing it in quotes, such as:
alias srm "find . -name \"*~\" | xargs rm"
Regards,
--
Glen Barber
_
Hi,
> Is this a problem with the pipe in the alias directive? The command
> works on the CLI, as I literally copy/pasted it into the .cshrc file.
I would think so.
What about:
alias srm /usr/bin/find . -name "*~" -delete
Best regards,
Olivier
___