I noticed something that looks strange to me, maybe because I'm not so familiar with Linux yet.
Supposing I'm in a directory containing various files and subdirectories, one of which is called BACKUP and is initially empty, what exactly happens if I launch the following command line:
???
If I'm not mistaken, all the content of the current directory should be copied into the BACKUP directory, apart from the directory BACKUP itself.
Actually I get a message saying something like:
Code:
cannot copy a directory onto itself
BUT when I look into the BACKUP directory I find another directory called BACKUP which I did not expect to find.
Moreover, if I launch the same command again I get the same message (repeated two or more times) and then I find that inside the "second" BACKUP directory there is a third one, with the same name again. In other words, every time I launch the command I get a deeper tree of "BACKUP" directories, as if the command was messing everything up.
I know that most probably I'm the one who's messing things up and I also know the "problem" can be easily bypassed by using as a destination for the copy a directory located elsewhere, but I'd like anyway to understand the reason for such a behaviour.
Thanks for any help.