bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Recursive copy of symbolic link...possible bug


From: Jason Quinn
Subject: Recursive copy of symbolic link...possible bug
Date: Mon, 9 Mar 2009 16:48:50 -0700 (PDT)
User-agent: G2/1.0

Suppose you have a symbolic link called "somelink" that points to
"somedir". I noticed there's different behavior between these two
commands:

cp -R somelink newdir
cp -R somelink/ newdir

The second command has a slash after the symbolic link name.

The first command causes newdir to be a another symbolic link that
points to "somedir". The second command actually creates a copy of
"somedir" called "newdir" (the behavior I expected).

Why does using the backslash here force a dereference?

Jason



reply via email to

[Prev in Thread] Current Thread [Next in Thread]