what is symbolic link in unix ???

Answer Posted / ajit mohan b

Linux has two kinds of file system links: symbolic links and
hard links.

A symbolic link — also called a soft link or symlink —
resembles a Windows shortcut. A symlink is a little file
that contains the pathname of another object on the
filesystem: a file, a directory, a socket, and so on —
possibly even the pathname of another link. This pathname
can be absolute or relative. To make a symlink, use ln with
the -s option. Give the name of the target first, then the
name of the link.

# ln –s existing-file-name link-name

We can still edit the original file by opening the symbolic
link, and changes we make doing that will "stick." But if we
delete the symbolic link, it has no impact on the original
file at all. If we move or rename the original file, the
symbolic link is "broken," it continues to exist but it
points at nothing.

A hard link isn’t itself a file. Instead, it’s a directory
entry. It points to another file using the file’s inode
number. Means both have same inode number. Any changes to
the original file will get reflected in the link file also
as both are same.

# ln existing-file-name link-name

To give a file more than one name or to make the same file
appear in multiple directories, you can make links to that
file instead of copying it. One advantage of this is that a
link takes little or even no disk space. Another is that, if
you edit the target of the link, those changes can be seen
immediately through the link.

Is This Answer Correct ?    17 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the Uses of mmap?

1187


Which is fastest ipc mechanism?

502


How to Map an Ordinary File?

1099


How many types of ipc mechanism do you know?

487


Explain Communication Between Parent and Child Processes?

1245






What are Pipes?

1177


What are System Calls?

1241


What is socket in ipc?

556


How to Debugg Semaphores?

1067


What is ipc class 3?

517


What is ipc 620 standard?

551


Which ipc mechanism is fastest and how?

543


What is the difference between j std 001 and ipc a 610?

482


What is ipc namespace?

528


How to Initialize Semaphores?

1126