From: Peter Mamonov <pmamonov@gmail.com>
To: barebox@lists.infradead.org
Subject: cp: incorrect behaviour when copying recursively
Date: Fri, 14 Apr 2017 13:10:51 +0300 [thread overview]
Message-ID: <20170414101051.GB16849@berta> (raw)
Hi,
The "cp -r <src> <dst>" command omits top directory, when the trailing "/" is
present in the <src> string. Here is the test case:
barebox@barebox sandbox:/test mkdir d1
barebox@barebox sandbox:/test echo -o d1/f1 1
barebox@barebox sandbox:/test mkdir d2
barebox@barebox sandbox:/test cd d2
barebox@barebox sandbox:/test/d2 cp -r ../d1/ .
barebox@barebox sandbox:/test/d2 ls
. .. f1
barebox@barebox sandbox:/test/d2 cp -r ../d1 .
barebox@barebox sandbox:/test/d2 ls
. .. d1 f1
barebox@barebox sandbox:/test/d2 version
barebox 2017.04.0-00169-g90e7a35e6 #1 Fri Apr 14 12:46:09 MSK 2017
Regards,
Peter
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2017-04-14 10:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-14 10:10 Peter Mamonov [this message]
2017-04-19 8:07 ` Sascha Hauer
2017-04-21 16:53 ` Peter Mamonov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170414101051.GB16849@berta \
--to=pmamonov@gmail.com \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox