From owner-freebsd-questions@FreeBSD.ORG Wed Dec 30 15:38:04 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1133B1065679 for ; Wed, 30 Dec 2009 15:38:04 +0000 (UTC) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: from gizmo.acns.msu.edu (gizmo.acns.msu.edu [35.8.1.43]) by mx1.freebsd.org (Postfix) with ESMTP id C66968FC0A for ; Wed, 30 Dec 2009 15:38:03 +0000 (UTC) Received: from gizmo.acns.msu.edu (localhost [127.0.0.1]) by gizmo.acns.msu.edu (8.13.6/8.13.6) with ESMTP id nBUFXAjY018411; Wed, 30 Dec 2009 10:33:10 -0500 (EST) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: (from jerrymc@localhost) by gizmo.acns.msu.edu (8.13.6/8.13.6/Submit) id nBUFXAOU018410; Wed, 30 Dec 2009 10:33:10 -0500 (EST) (envelope-from jerrymc) Date: Wed, 30 Dec 2009 10:33:10 -0500 From: Jerry McAllister To: Steve Bertrand Message-ID: <20091230153310.GA18368@gizmo.acns.msu.edu> References: <4B3AA3CD.3020709@ibctech.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B3AA3CD.3020709@ibctech.ca> User-Agent: Mutt/1.4.2.2i Cc: "freebsd-questions@freebsd.org Questions -" Subject: Re: Adding an alias to .cshrc X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2009 15:38:04 -0000 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. Something like: alias srm "find . -name \"*~\" | xargs rm" ////jerry > ...so that I have an easy way to remove the temp files left by svn. > > After adding the alias, logging out and then back in, I get an error > stating: > > acct-dev: ISP-RADIUS % srm > srm: Command not found. > > I thought that perhaps the file wasn't being read upon login, so I > appended a new alias underneath: > > alias srm find . -name "*~" | xargs rm > alias sll ls -lA > > ...which works fine when called after re-login. > > I even went as far as to prefix the find/xargs command with full paths, > to no avail. > > 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. > > Steve > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"