GNU bug report logs - #18537
Problem if folder name includes just '-'

Previous Next

Package: coreutils;

Reported by: en.ko <at> gmx.de

Date: Tue, 23 Sep 2014 16:52:02 UTC

Severity: normal

Tags: notabug

Done: Eric Blake <eblake <at> redhat.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 18537 in the body.
You can then email your comments to 18537 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#18537; Package coreutils. (Tue, 23 Sep 2014 16:52:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to en.ko <at> gmx.de:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Tue, 23 Sep 2014 16:52:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: en.ko <at> gmx.de
To: bug-coreutils <at> gnu.org
Subject: Problem if folder name includes just '-'
Date: Tue, 23 Sep 2014 12:49:12 +0200
Hello,

may I just not find the solution, but I can not solve the following
problem, so I guess there is no solution jet.

I tried to move a folder resp. files in a folder by the mv command.

Example: mv ------------------------ NewName

The Problem is mv responses 'unknown option' for the folder name. Also
mv ------------------------/* NewName
mv \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- NewName
mv \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-/* NewName
does not work.

In meantime I solved the problem by changing the source folder name. But
this is a (very specific) problem.

Best regards
Benedikt




Added tag(s) notabug. Request was from Eric Blake <eblake <at> redhat.com> to control <at> debbugs.gnu.org. (Tue, 23 Sep 2014 17:55:01 GMT) Full text and rfc822 format available.

Reply sent to Eric Blake <eblake <at> redhat.com>:
You have taken responsibility. (Tue, 23 Sep 2014 17:55:03 GMT) Full text and rfc822 format available.

Notification sent to en.ko <at> gmx.de:
bug acknowledged by developer. (Tue, 23 Sep 2014 17:55:04 GMT) Full text and rfc822 format available.

Message #12 received at 18537-done <at> debbugs.gnu.org (full text, mbox):

From: Eric Blake <eblake <at> redhat.com>
To: en.ko <at> gmx.de, 18537-done <at> debbugs.gnu.org
Subject: Re: bug#18537: Problem if folder name includes just '-'
Date: Tue, 23 Sep 2014 11:54:51 -0600
[Message part 1 (text/plain, inline)]
tag 18537 notabug
thanks

On 09/23/2014 04:49 AM, en.ko <at> gmx.de wrote:
> Hello,
> 
> may I just not find the solution, but I can not solve the following
> problem, so I guess there is no solution jet.
> 
> I tried to move a folder resp. files in a folder by the mv command.
> 
> Example: mv ------------------------ NewName

POSIX requires, and most applications support, the use of '--' to mark
the end of options, forcing the next argument beginning with '-' to be
treated as a literal name rather than an option:

mv -- ------------------ NewName

Also, you can ALWAYS turn a relative pathname into one anchored by a
substring that does not begin with '-':

mv ./------------------ NewName.

This is a FAQ:
https://www.gnu.org/software/coreutils/faq/coreutils-faq.html#How-do-I-remove-files-that-start-with-a-dash_003f

Therefore, I'm closing this as not a bug, although you may feel free to
ask further questions.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

[signature.asc (application/pgp-signature, attachment)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 22 Oct 2014 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 246 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.