1
I program I was using to out put some files apparently did not understand the short cut "~" (directory) very well and has done some trickery that has me confused.
Rather than put the files where I would expect them (/home/me) it has a made a folder in it's subdirectory called "~". (someprogram/~)
drwxr-xr-x 3 me users 4096 Jan 30 09:34 ~
If I cd into it I get back to /home/me
Is this just a hardlink? I imagine if I try to delete it will will delete my home folder. How can I safely remove it and not delete everything?
Have you tried to delete the hard link? You need to determine if your dealing with a hard link or not. – Ramhound – 2014-01-30T00:13:27.920
@Ramhound It's not a hardlink. Well, shouldn't be (Hyposaurus, make sure you compare the inode of this one and the actual home dir to make sure) - it's tilde expansion in bash.
– Bob – 2014-01-30T00:14:44.503@bob didn't seem like one after 30 seconds of research on hard links /-) – Ramhound – 2014-01-30T00:17:36.547
1@Ramhound A hardlink is basically two files pointing to the same data on disk (inode). Deleting one 'file' of a hardlink removes just the pointer, while modifying the data (or truncating it) will overwrite the actual data and 'change both files'. Unfortunately, if it's not actually a hardlink, and is a shell expansion (as in this case), deleting it could very well lead to undesired loss of data. Always use
rm -i
when uncertain, and try to ask if you can (on that note - thanks for asking before, rather than delete and ask about recovery!). – Bob – 2014-01-30T00:21:00.093Its not a hardlink: inode from /home/me 20185089, from other dir 28579771 – Doug Miller – 2014-01-30T01:31:45.890