Re: rm -R
Joshua Isom wrote: > But google and other search engines treats words([A-Za-z0-9]) > starting with - as meaning exclude results with this, even when > obvious it's about unix commands. It can be rather annoying > when searching for help. This comment suggests a new translation of GNU: Google's Not Unix (although it may well be _hosted on_ a Unix variant). Absent some very advanced AI, nothing is "obvious" to a computer :) The "-" character means different things in different environments. When you know what command is needed, the manpage is usually the best reference. Save the search engines for when you _don't_ know which command to use -- and even then you probably should try "man -k" or "apropos" first. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: rm -R
On Sat, 02 Mar 2013 23:45:30 +0100, Julian H. Stacey wrote: > Hi, > Reference: > > From: Jos Chrispijn > > Date: Sat, 02 Mar 2013 18:44:22 +0100 > > Message-id: <51323a76.2040...@webrz.net> > > Jos Chrispijn wrote: > > > > Teske, Devin: > > > rm -R -- -S > > > > > > The "--" tells it "here's the end of the options, here come the > > > file/directories" > > > > Almost: > > > > rm -R -- -S; > > > > did it, thanks very much for you help! > > This also works > rmdir ./-S > (& is probably the best generic naming method, & was valid decades > ago, before rm got the luxury of modern stuff eg -- & would work > for other commands that might not have delimieters such as -- ) > This also work but is over kill : > rmdir './-S' Just note that the ; has been part of the name in question, so the "end of command" sign would have to be part of the directory name: "rmdir ./-S;" and "rmdir './-S;' would be the alternatives to "rm -R -- -S;". I'd be interested in what happens when you have such a directory name and press PF8 in the Midnight Commander in order to delete it. Now go ahead and create a file "*" in / and tell a junior sysadmin to remove it. ;-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: rm -R
On 3/2/2013 8:27 PM, Gary Kline wrote: On Sat, Mar 02, 2013 at 07:43:50PM -0600, Joshua Isom wrote: On 3/2/2013 2:43 PM, David Tilbrook wrote: The problem (and its solution) have been raised for at least 39 years. But google and other search engines treats words([A-Za-z0-9]) starting with - as meaning exclude results with this, even when obvious it's about unix commands. It can be rather annoying when searching for help. ___ sorry to be so dense; can you give me a few concrete examples? ya lost me! tx Start with basics, http://www.lmgtfy.com/?q=rm+-rf now find something relevant even though `rm -rf` is so common under unix. Oddly, `rm -S` gives the wikipedia webpage first. It doesn't mention anything about -- or using ./ to delete files. The man page lists is, so the "true" documentation is sound, but if you're looking on the internet you have to know how to search. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: rm -R
On Sat, 2 Mar 2013 18:27:15 -0800, Gary Kline wrote: > On Sat, Mar 02, 2013 at 07:43:50PM -0600, Joshua Isom wrote: > > On 3/2/2013 2:43 PM, David Tilbrook wrote: > > >The problem (and its solution) have been > > >raised for at least 39 years. > > > > But google and other search engines treats words([A-Za-z0-9]) > > starting with - as meaning exclude results with this, even when > > obvious it's about unix commands. It can be rather annoying when > > searching for help. > > ___ > > > sorry to be so dense; can you give me a few concrete examples? ya > lost me! Just as one of many examples, google for "find -name" (without the quotes of course), a typical combination which the "AND NEAR" search should return sufficient results for. Compare the list of results to what you would expect. Now, google for "find -name" _including_ the quotes (!) in order to have google treat the search string literally. The results will be different, as you would expect. In ye olde times when search engine meant altavista.digital.com (if I remember correctly), search strings usually needed to include + (AND) and - (AND NOT) if you wanted to construct a search term consisting of more than one word. With google implying a "+ prefix" for every search word _and_ assuming they should be as near as possible to each other (therefor the name "AND NEAR" for the kind of search) this became obsolete. Almost, as it seems... -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: rm -R
On Sat, Mar 02, 2013 at 07:43:50PM -0600, Joshua Isom wrote: > On 3/2/2013 2:43 PM, David Tilbrook wrote: > >The problem (and its solution) have been > >raised for at least 39 years. > > But google and other search engines treats words([A-Za-z0-9]) > starting with - as meaning exclude results with this, even when > obvious it's about unix commands. It can be rather annoying when > searching for help. > ___ sorry to be so dense; can you give me a few concrete examples? ya lost me! tx > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org" -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix Twenty-six years of service to the Unix community. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: rm -R
On 3/2/2013 2:43 PM, David Tilbrook wrote: The problem (and its solution) have been raised for at least 39 years. But google and other search engines treats words([A-Za-z0-9]) starting with - as meaning exclude results with this, even when obvious it's about unix commands. It can be rather annoying when searching for help. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: rm -R
On Sat, 2 Mar 2013, David Tilbrook wrote: Wjy are we syill having this conversation? The problem (and its solution) have been raised for at least 39 years. To specify a file, directory, device, whatever, whose leaf name begins with a `-', name it using a leading `./' as in: whatever ./-S That will work for all programs, even those that do not support -- to terminate flags. Furthermore it will support glob patterns. Now was that so difficult? -- dt Also find -type [df] -name "string" | xargs command find is pretty good about finding names with special characters and they get passed though xargs ok. This does not work with names with spaces of course. Also pretty easy to test at each step to make sure you are doing want you intend. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: rm -R
Hi, Reference: > From: Jos Chrispijn > Date: Sat, 02 Mar 2013 18:44:22 +0100 > Message-id: <51323a76.2040...@webrz.net> Jos Chrispijn wrote: > > Teske, Devin: > > rm -R -- -S > > > > The "--" tells it "here's the end of the options, here come the > > file/directories" > > Almost: > > rm -R -- -S; > > did it, thanks very much for you help! This also works rmdir ./-S (& is probably the best generic naming method, & was valid decades ago, before rm got the luxury of modern stuff eg -- & would work for other commands that might not have delimieters such as -- ) This also work but is over kill : rmdir './-S' Cheers, Julian -- Julian Stacey, BSD Unix Linux C Sys Eng Consultant, Munich http://berklix.com Reply below not above, like a play script. Indent old text with "> ". Send plain text. No quoted-printable, HTML, base64, multipart/alternative. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: rm -R
Wjy are we syill having this conversation? The problem (and its solution) have been raised for at least 39 years. To specify a file, directory, device, whatever, whose leaf name begins with a `-', name it using a leading `./' as in: whatever ./-S That will work for all programs, even those that do not support -- to terminate flags. Furthermore it will support glob patterns. Now was that so difficult? -- dt ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: rm -R
Teske, Devin: rm -R -- -S The "--" tells it "here's the end of the options, here come the file/directories" Almost: rm -R -- -S; did it, thanks very much for you help! BR, Jos Chrispijn ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: rm -R
Teske, Devin: rm -R -- -S The "--" tells it "here's the end of the options, here come the file/directories" Almost : rm -R -- -S; did it, thanks very much! BR, Jos Chrispijn. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: rm -R
Ralf Mardorf: rm -R "-S\;" rm -R ?S? rm: illegal option -- S usage: rm [-f | -i] [-dIPRrvW] file ... unlink file regards, Jos Chrispijn ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: rm -R
On Sat, 2013-03-02 at 16:50 +0100, Jos Chrispijn wrote: > I made a folder called -S; > > how can I remove that again? > > did a rm -R '-S;' but that doesn't work (...). rm -R "-S\;" rm -R ?S? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
RE: rm -R
rm -R -- -S The "--" tells it "here's the end of the options, here come the file/directories" -- Devin From: owner-freebsd-questi...@freebsd.org [owner-freebsd-questi...@freebsd.org] on behalf of Jos Chrispijn [ker...@webrz.net] Sent: Saturday, March 02, 2013 7:50 AM To: freebsd-questions@FreeBSD.org Subject: rm -R I made a folder called -S; how can I remove that again? did a rm -R '-S;' but that doesn't work (...). thanks for your advise, Jos Chrispijn ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org" _ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"