Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
[ edit: Never mind - misread, but I'll leave my original interpretation anyway ]
It means somebody concatenated two path components together, but didn't bother with path canonicalization. The internal /./ is superfluous and can be removed.
It means somebody concatenated two path components together
Did you fail to see the blank between the . and the following / in the original post? Or did you assume it was a typo? Or you have some other reason why it doesn't invalidate you answer?
But, so far as I understand, the command in that post does nothing, because it interprets /etc/. as /etc and cp skips directories.
Yes, I failed. It appeared as a single path to me. This is where a fixed-width font is useful (eg. place such text within [ code ] [ / code ] tags. Since font size/family is a browser's/user's choice, on my system the space is very hard to distinguish at 1600x1200 sitting 3 feet away from the monitor.
I knew the command would fail:
Code:
$ cp empty/. ./newdir
cp: empty/. is a directory (not copied).
I can't see the blank either. I wondered whether one was there and tried selecting it with the cursor tool. Since I could select it, I knew it was there. Of course I agree such things should use code tags so we can see them.
But I still have no good guess what mistake by the OP or by whatever source he copied from is responsible for the useless command.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.