|
|
| Boris Glawe 2004-01-23, 7:11 pm |
| Hi,
I've got a file which has a name like this:
-Zero
when I say
mv -Zero Zero
mv complains that the option -Z is not known.
The same happens with
mv '-Zero' Zero
mv "-Zero" Zero
mv \-Zero Zero
is this a bug or is there a way to rename this file ?
greets and thanks Boris
| |
| Alexander Dalloz 2004-01-23, 7:11 pm |
| On Sun, 14 Dec 2003 15:54:11 +0100 Boris Glawe wrote:
quote:
> Hi,
>
> I've got a file which has a name like this:
>
> -Zero
>
> when I say
> mv -Zero Zero
>
> mv complains that the option -Z is not known.
>
> The same happens with
> mv '-Zero' Zero
> mv "-Zero" Zero
> mv \-Zero Zero
>
> is this a bug or is there a way to rename this file ?
>
> greets and thanks Boris
mv -- -Zero Zero
Alexander
--
Alexander Dalloz | Enger, Germany
PGP key valid: made 13.07.1999
PGP fingerprint: 2307 88FD 2D41 038E 7416 14CD E197 6E88 ED69 5653
| |
| Boris Glawe 2004-01-23, 7:11 pm |
| Alexander Dalloz wrote:quote:
> On Sun, 14 Dec 2003 15:54:11 +0100 Boris Glawe wrote:
>
>
>
>
> mv -- -Zero Zero
>
> Alexander
>
>
thanks :-)
| |
| Web Surfer 2004-01-23, 7:11 pm |
| [This followup was posted to redhat.general]
In article <brhtil$djf$1@newsreader2.netcologne.de>, boris@boris-
glawe.de says...quote:
> Hi,
>
> I've got a file which has a name like this:
>
> -Zero
>
> when I say
> mv -Zero Zero
>
> mv complains that the option -Z is not known.
>
> The same happens with
> mv '-Zero' Zero
> mv "-Zero" Zero
> mv \-Zero Zero
>
> is this a bug or is there a way to rename this file ?
>
> greets and thanks Boris
>
mv ./-Zero Zero
| |
| Alexander Dalloz 2004-01-23, 7:11 pm |
| On Mon, 15 Dec 2003 08:15:56 -0600 Web Surfer wrote:
quote:
> mv ./-Zero Zero
../ is no valid escaping! It says "current directory".
Alexander
--
Alexander Dalloz | Enger, Germany
PGP key valid: made 13.07.1999
PGP fingerprint: 2307 88FD 2D41 038E 7416 14CD E197 6E88 ED69 5653
| |
| Charles LaCour 2004-01-23, 7:11 pm |
| Alexander Dalloz wrote:quote:
> On Mon, 15 Dec 2003 08:15:56 -0600 Web Surfer wrote:
>
>
>
>
> ./ is no valid escaping! It says "current directory".
>
> Alexander
>
>
You are correct it is not 'escaping' the - but it works! It is all in
how the command line is parsed. Just like the use of -- on a command
line changes the way any further -'s are handled the ./ preceding the -
causes bash to not treat it as an option indicator.
--
Thanks
Charles LaCour
|
|
|
|