From owner-freebsd-questions@FreeBSD.ORG Tue Mar 1 21:27:14 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5C69616A4CE for ; Tue, 1 Mar 2005 21:27:14 +0000 (GMT) Received: from smtp806.mail.sc5.yahoo.com (smtp806.mail.sc5.yahoo.com [66.163.168.185]) by mx1.FreeBSD.org (Postfix) with SMTP id C80F243D1F for ; Tue, 1 Mar 2005 21:27:13 +0000 (GMT) (envelope-from krinklyfig@spymac.com) Received: from unknown (HELO smogmonster.com) (jtinnin@pacbell.net@64.171.3.242 with login) by smtp806.mail.sc5.yahoo.com with SMTP; 1 Mar 2005 21:27:13 -0000 From: Joshua Tinnin To: freebsd-questions@freebsd.org Date: Tue, 1 Mar 2005 13:27:11 -0800 User-Agent: KMail/1.7.2 References: <20050228165856.D333143D5F@mx1.FreeBSD.org> <200503011518.35088.kirk@strauser.com> In-Reply-To: <200503011518.35088.kirk@strauser.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200503011327.12183.krinklyfig@spymac.com> Subject: Re: dir ~ X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Mar 2005 21:27:14 -0000 On Tuesday 01 March 2005 01:18 pm, Kirk Strauser wrote: > On Tuesday 01 March 2005 12:33, Xavier Maillard wrote: > > My best bet on this issue is to list this by inode -i.e. ls -i > > and then track this inode using the inum switch of the find > > command to delete the item. > > Ouch. "rm -- fileWithWeirdName" is usually a lot easier. For > example, if you create a file named "-", then "rm -- -" will get rid > of it. I don't think this will work in his example. The man page explains it like this: The rm command uses getopt(3) to parse its arguments, which allows it to accept the `--' option which will cause it to stop processing flag options at that point. This will allow the removal of file names that begin with a dash (`-'). For example: rm -- -filename So, `--' only causes it to stop processing flag options, not shell expansion. `~' is not a marker for a flag. - jt