You have not copied a file and renamed it .
(at any rate if you're running a sane *nix). Instead you have copied the file to the current directory with the name of the original file. (If you pass a directory to cp
as the destination, files will be placed in that directory. .
is the current directory, so this is all that has happened.) If you want to remove it you can just rm uniprot_sprot.fasta.gx.iscloud
or explicitly rm ./uniprot_sprot.fasta.gx.iscloud
. What you have tried to do is to remove a file whose name starts with .
, which is a different thing.
Edit: I was unaware when I wrote this, but this is in fact simply down to .
existing as a real, regular hardlink. At syscall level you can create a file whose name contains anything except /
and \x00
(yep, including \n
), assuming your filesystem allows it. However, the links .
and ..
are already present and thus unavailable as a file name. @thatotherguy links to the kernel source for the rmdir
syscall, showing that in modern Linux at least it is the kernel itself which ultimately prevents you from deleting .
and ..
.
Note that in bash, .
at the beginning of a line by itself means source
.
See this question on unix.se and its linked dupe for more information on the filename problem.