|
From: | Eric Blake |
Subject: | bug#6924: hi there is misstake in rm --help option |
Date: | Fri, 27 Aug 2010 10:50:01 -0600 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100806 Fedora/3.1.2-1.fc13 Mnenhy/0.8.3 Thunderbird/3.1.2 |
On 08/27/2010 08:19 AM, Artur Kulikowski wrote:
To remove a file whose name starts with a `-', for example `-foo', the * marki s forgotten shouldn't it be : rm -- -foo*
Only if you are trying to remove a file whose name starts with "-foo" but contains even more bytes. But the example was clear that we are concerned about a file that is named exactly "-foo", and only that it starts with "-", not "-foo". I think the wording is fine as-is.
Without * it didn't work for me
What do you mean by didn't work? Can you post the exact sequence of commands that you did to create and try to remove a problematic file name, and the error message (if any) that made you assume that it didn't work? The whole point of that text in the example is that you use either -- or inserting a leading ./ to remove a problematic filename that is relative to the current directory; but you still have to type either the full filename or use shell globbing just as with any other file name.
-- Eric Blake address@hidden +1-801-349-2682 Libvirt virtualization library http://libvirt.org
[Prev in Thread] | Current Thread | [Next in Thread] |