RE: How can I remove this file ?
-Original Message- From: [EMAIL PROTECTED] [mailto:owner-freebsd- [EMAIL PROTECTED] On Behalf Of Supote Leelasupphakorn Sent: Friday, April 09, 2004 7:41 AM To: [EMAIL PROTECTED] Subject: How can I remove this file ? Hi lists How can I delete file named prefix with - ? TIA Pote rm ./-file Nick Radonicich [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: How can I remove this file ?
Nick wrote: -Original Message- From: [EMAIL PROTECTED] [mailto:owner-freebsd- [EMAIL PROTECTED] On Behalf Of Supote Leelasupphakorn Sent: Friday, April 09, 2004 7:41 AM To: [EMAIL PROTECTED] Subject: How can I remove this file ? Hi lists How can I delete file named prefix with - ? TIA Pote rm ./-file rm -- -file -ste ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: How can I remove this file ?
i normally keep a -stable and a -current. when removing -stable rm -rf ./\-stable path here is relative, abspath works as well. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: How can I remove this file ?
On Fri, Apr 09, 2004 at 12:40:35PM +0100, Supote Leelasupphakorn wrote: Hi lists How can I delete file named prefix with - ? Use rm ./- -- Jonathan Chen [EMAIL PROTECTED] -- Only the meek get pinched. The bold survive. - Ferris Bueller ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: How can I remove this file ?
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 [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: How can I remove this file ?
Erik Trulsson wrote: 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 I've never run across that. % cd tmp % ls % touch - % ls - % rm - % ls % although if it was giving you trouble, I suppose you could do a rm ./\- -- David Piniella University of Miami ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
RE: How can I remove this file ?
-Original Message- From: David Piniella Sent: Friday, April 09, 2004 10:02 AM I've never run across that. % cd tmp % ls % touch - % ls - % rm - % ls % although if it was giving you trouble, I suppose you could do a rm ./\- -- David Piniella University of Miami David, I think you missed the part where the hypen was the first character of the filename, not the only character. $ touch -file touch: illegal option -- i usage: touch [-acfm] [-r file] [-t [[CC]YY]MMDDhhmm[.SS]] file ... $ touch -- -file $ rm -file rm: illegal option -- l usage: rm [-f | -i] [-dPRrvW] file ... unlink file $ rm -- -file -- Troy Settle Pulaski Networks http://www.psknet.com 866.477.5638 ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]