A query on soft-link

Hi All,

I tried creating a soft link with the file itself. It got created successfully.

bash-3.2$ ls -l a
lrwxrwxrwx   1 ebrigup  other          1 Oct  5 19:14 a -> a
bash-3.2$

Can anyone explain what is the possible use of it. I dont see any except practically wasting an inode and server space.

Your positive comments will be highly appreciated.

Thanks
Brijesh

If you have a file/directory that will be needed at many different places and don't want to copy it <n> times everywhere in your filesystems, you simply use a soft link to reference to the original file.

Depending which type of filesystem you use and if it is not for thousands or hundred of thousands of files/directories, I would rather not speak of a waste of i-nodes.
We save disk space with them and enhance the administrative complexity a lot.

I am thankful we have this feature when needed.

A soft link allows you to put nearly any text into it, not necessarily paths and files. So why take the extra effort to check and disallow a self reference? You'll hit a brick wall anyhow sooner or later:

a: Too many levels of symbolic links