Date: Fri, 9 Apr 2004 13:50:34 +0200 From: Erik Trulsson <ertr1013@student.uu.se> To: Supote Leelasupphakorn <pjn0211@yahoo.com> Cc: freebsd-questions@freebsd.org Subject: Re: How can I remove this file ? Message-ID: <20040409115034.GA57507@falcon.midgard.homeip.net> In-Reply-To: <20040409114035.40752.qmail@web40604.mail.yahoo.com> References: <20040409114035.40752.qmail@web40604.mail.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 -- <Insert your favourite quote here.> Erik Trulsson ertr1013@student.uu.se
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040409115034.GA57507>