Expalin soft link and hard link
Answers were Sorted based on User's Feedback
Answer / vishwanath
Softlink : A file that points to another file it could be
another file, directory, device file, or a symobolic
link ...inode number of soucefile & link would be different
from eah other...softlink can link between differenet file
system.
command to create the softlink ...
ln -s sourcefile link
Hardlink : A hardlink share same inode number. Hard link
point to only file not directory... it cannot span
different file system ....hard link can only link the file
on same file system...
syntax.
ln sourcefile link...
Is This Answer Correct ? | 6 Yes | 0 No |
Answer / baskar
softlink-linked to the another file, its permission are
lrwxrwxrwx which is starting with l, its inode no. are
different, user ln -s filename linkname to create soft link
Hardlink-A hardlink is not a separate type of file. So its
inode no. will be same. use ln filename linkname to create
hardlink. Unlike softlink hardlinks cannot span file system.
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / vijayakanth.g
Hard link
Two files denoting the same inode number is called hard
link
Syntax to create hard link
#ln file1 file2
Here file2 is the copy of file1 if delete fiel1 the
contents in the file1 is still present in file2
Soft links
Two files denoting different inode number which has link
with in them then its said to be soft link or symbolic links
Syntax is
#ln -s file1 file2
Here fiel2 has the contents of file1 if file1 is get
deleted then the data will be lost
Is This Answer Correct ? | 4 Yes | 1 No |
Answer / nayan vartak
SOFT LINK
Soft Links have different inode numbers.
ls -l command shows all links with second column value 1 and
the link points to original file.
Removing soft link doesn't affect anything but removing
original file the link becomes dangling link which points to
nonexistant file
Soft link can create across the file system
------------------------------------------------
HARD LINK
Hard Links have same inode number.
ls -l command shows all the links with the link
column(Second) shows No. of links.
.Removing any link just reduces the link count but doesn't
affect other links.
Hard link cannot create across the file system
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / mohammed mukram
softlink: file which points out another file is a
softlink,this file has the pathname of the file it points
out.
hardlink: every file has a hardlink , the name of the file
is itself is a hadr link for that file. or the association
between the file and the inode is a hard link.
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / gowri
A symbolic link is a file that points to another file. Like
directories, which
contain only directory information, symbolic links contain
only one type of data.
A symbolic link contains the path name of the file to which
it points.Because symbolic links use path names to point to
other files, they can point to files in other file systems
The size of a symbolic link always matches the number of
characters in the path name it contains.
The ln command with the –s option creates a symbolic link.
# ln -s file1 link1
Symbolic links refer to other file names.
A symbolic link contains the path name
of the file to which it points.
A hard link is the association between a file name and an
inode. A hard link is not a separate type of file. Every
type of file uses at least one hard link
# ln file1 file2
Deleting one of the files has no effect on the other file.
The link count decrements accordingly.
The following example shows how deleting file1 from the
previous
example has no effect on file2.
# rm file1
# ls -li
total 0
1282 -rw-r--r-- 1 root root 0 Sep 23 13:19 file2
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / ramunix123
Softlink : link between two different file systems and inode
number will be different
#ln -s /U3/f1 - /U4/f2
#ln –s /U3/file1 /U4/file2
Hardlink : link between same file systems and inode number
will be same
#ln /U3/f1 /U3/f2
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / sbrahman75
Softlink : link between different file systems and inode
number will be different
(eg) /U3 - /U4
#ln –s /U3/file1 /U4/file2
Hardlink : link between same file systems and inode number
will be same
(eg) /U3 - /U3
#ln –s /U3/file1 /U3/file2
Is This Answer Correct ? | 1 Yes | 3 No |
how to stop the process using process name
Difference between probe-scsi-all and probe-scsi
How many controllers in 3510 storage.
How to check the communication between 2 nodes?
Explain /etc/inittab files
How will you ad new aliases name
can you explain about the vxencap command in veritas volume manager?
Which file will take place while booting
If the system panic or system not booting
How to mirror a root dg? With eg
We have edit the /etc/passwd file and modify a user forget to give the shell will user able to loging?
What is the protocol supported by NFS