I have managed to create a bizarre problem in my file system and I don't know how to recover. In my home directory I had a Dropbox folder and I decided to change the scope of the Dropbox folder to include my complete home folder as well as any home folders for other users on this system. Before starting this procedure I closed Dropbox.
The Dropbox folder contained directories that had been symlinked from the home directory as well as normal directories. I then started to move directories out from the Dropbox folder to the home directory. I successfully moved all but one folder. The last folder was truly bizarre. It had a file name of "~" only and was created about two months ago so I have no idea what managed to create it. If I do an ls on it I get the contents of the home directory. I have thus created a loop in the file system since since the Dropbox folder is a sub-folder of the home folder and the dropbox folder effectively contains the home folder as a sub-folder, meaning that I am unable to remove the Dropbox folder from the home folder as it is not empty.
What I would like to do remove the directory entry for the "~" folder from the Dropbox folder, using the command line, without removing the directory contents which are actually the contents of the home folder but I have no idea how to do this.
~
and\~
. ;-) – Fabby Apr 16 '16 at 21:24rm \~
... – Fabby Apr 16 '16 at 22:36~ -> /home/USERNAME
inls -a
in the dir containing the dupe~
. Just dorm -r '~'
(mind the single quotes) – Apr 18 '16 at 11:57