From owner-freebsd-questions@FreeBSD.ORG Fri Apr 9 04:50:37 2004 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 BD33C16A4CE for ; Fri, 9 Apr 2004 04:50:37 -0700 (PDT) Received: from av13-1-sn4.m-sp.skanova.net (av13-1-sn4.m-sp.skanova.net [81.228.10.104]) by mx1.FreeBSD.org (Postfix) with ESMTP id B95B143D5C for ; Fri, 9 Apr 2004 04:50:36 -0700 (PDT) (envelope-from ertr1013@student.uu.se) Received: by av13-1-sn4.m-sp.skanova.net (Postfix, from userid 502) id D551437E46; Fri, 9 Apr 2004 13:50:35 +0200 (CEST) Received: from smtp4-2-sn4.m-sp.skanova.net (smtp4-2-sn4.m-sp.skanova.net [81.228.10.180]) by av13-1-sn4.m-sp.skanova.net (Postfix) with ESMTP id C505137E42 for ; Fri, 9 Apr 2004 13:50:35 +0200 (CEST) Received: from falcon.midgard.homeip.net (h201n1fls24o1048.bredband.comhem.se [212.181.162.201]) by smtp4-2-sn4.m-sp.skanova.net (Postfix) with SMTP id 7AF9637E43 for ; Fri, 9 Apr 2004 13:50:35 +0200 (CEST) Received: (qmail 57800 invoked by uid 1001); 9 Apr 2004 11:50:34 -0000 Date: Fri, 9 Apr 2004 13:50:34 +0200 From: Erik Trulsson To: Supote Leelasupphakorn Message-ID: <20040409115034.GA57507@falcon.midgard.homeip.net> Mail-Followup-To: Supote Leelasupphakorn , freebsd-questions@freebsd.org References: <20040409114035.40752.qmail@web40604.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040409114035.40752.qmail@web40604.mail.yahoo.com> User-Agent: Mutt/1.5.6i cc: freebsd-questions@freebsd.org Subject: Re: How can I remove this file ? 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: Fri, 09 Apr 2004 11:50:37 -0000 On Fri, Apr 09, 2004 at 12:40:35PM +0100, Supote Leelasupphakorn wrote: > Hi lists > > How can I delete file named prefix with "-" ? If you had bothered to read the manpage for rm(1) you would already know that since the following paragraph appears there: 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 The same behavior can be obtained by using an absolute or relative path reference. For example: rm /home/user/-filename rm ./-filename -- Erik Trulsson ertr1013@student.uu.se