GNU bug report logs - #6405
cp from -MM to -M

Previous Next

Package: coreutils;

Reported by: Peng Yu <pengyu.ut <at> gmail.com>

Date: Fri, 11 Jun 2010 19:39:02 UTC

Severity: normal

Done: Bob Proulx <bob <at> proulx.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 6405 in the body.
You can then email your comments to 6405 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 owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org:
bug#6405; Package coreutils. (Fri, 11 Jun 2010 19:39:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Peng Yu <pengyu.ut <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Fri, 11 Jun 2010 19:39:02 GMT) Full text and rfc822 format available.

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

From: Peng Yu <pengyu.ut <at> gmail.com>
To: bug-coreutils <at> gnu.org
Subject: cp from -MM to -M
Date: Fri, 11 Jun 2010 14:38:13 -0500
I'm trying to cp -MM to -M. But so far I don't have a way to do it.
Would you please let me know what is the correct way to cp from -MM to
-M?

$ cp -r -- -MM/ -- -M
cp: target `-M' is not a directory
$ ll -go
total 0
drwx------ 2 64 2010-06-11 14:35 -MM

-- 
Regards,
Peng




Reply sent to Bob Proulx <bob <at> proulx.com>:
You have taken responsibility. (Fri, 11 Jun 2010 20:19:01 GMT) Full text and rfc822 format available.

Notification sent to Peng Yu <pengyu.ut <at> gmail.com>:
bug acknowledged by developer. (Fri, 11 Jun 2010 20:19:01 GMT) Full text and rfc822 format available.

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

From: Bob Proulx <bob <at> proulx.com>
To: Peng Yu <pengyu.ut <at> gmail.com>
Cc: 6405-done <at> debbugs.gnu.org
Subject: Re: bug#6405: cp from -MM to -M
Date: Fri, 11 Jun 2010 14:18:39 -0600
Hi Peng,

If you would be so kind could you in the future address these types of
messages to coreutils <at> gnu.org instead of bug-coreutils?  The
bug-coreutils address has been changed from "all-discussion" to
"bug-discussion" and along with that change every message here now
opens a bug ticket in the bug tracking system so that we don't lose
track of reported bugs.  The coreutils <at> gnu.org address was created for
general discussion that isn't attached to the bug tracking system.
Thanks!

Peng Yu wrote:
> I'm trying to cp -MM to -M. But so far I don't have a way to do it.
> Would you please let me know what is the correct way to cp from -MM to
> -M?
> 
> $ cp -r -- -MM/ -- -M
> cp: target `-M' is not a directory

The first "--" stops further option recognition and processing.  So it
is only needed once.  The second one after the first one has turned
off option processing is therefore recognized as a filename.  Since
you have three files listed (the extra one being "--") then the target
is required to be a directory.

Instead just use one "--".  You wanted to say:

  $ cp -r -- -MM -M

Or traditional usage would use "./" to avoid the first character of
the string from starting with a dash.

  $ cp -r ./-MM ./-M

Since the strings do not start with a dash then they are not
recognized as command option arguments.

Bob




Information forwarded to owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org:
bug#6405; Package coreutils. (Fri, 11 Jun 2010 20:35:02 GMT) Full text and rfc822 format available.

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

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: bug-coreutils <at> gnu.org
Cc: Peng Yu <pengyu.ut <at> gmail.com>
Subject: Re: bug#6405: cp from -MM to -M
Date: Fri, 11 Jun 2010 22:06:22 +0200
At Friday 11 June 2010, Peng Yu wrote:
> I'm trying to cp -MM to -M. But so far I don't have a way to do it.
> Would you please let me know what is the correct way to cp from -MM
>  to -M?
> 
> $ cp -r -- -MM/ -- -M
The first `--' stops option processing, and so the second `--' is 
interpreted like a file path, not like an option.
> cp: target `-M' is not a directory
> $ ll -go
> total 0
> drwx------ 2 64 2010-06-11 14:35 -MM
> 
Simply use:
  $ cp -r -- -MM/ -M
or:
  $ cp -r ./-MM/ ./-M

Stefano




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 10 Jul 2010 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 15 years and 33 days ago.

Previous Next


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