Expalin soft link and hard link

Answers were Sorted based on User's Feedback



Expalin soft link and hard link..

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

Expalin soft link and hard link..

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

Expalin soft link and hard link..

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

Expalin soft link and hard link..

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

Expalin soft link and hard link..

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

Expalin soft link and hard link..

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

Expalin soft link and hard link..

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

Expalin soft link and hard link..

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

Post New Answer

More Solaris Commands Interview Questions

After creating user account successfully it shows 64 blocks.what for these 64 blocks are used and what information is stored in this blocks?

5 Answers  


How to delete “abc” files using find command

3 Answers  


How can u find a file which is logged in last week?

0 Answers  


How to add a group

4 Answers  


How to configure the network card

2 Answers  






How can youy check the disk status in , is it locally connected or remotely connected?

4 Answers   Thomson Reuters,


how to now the network speed, whether it is a full duplex or half duplex? and what is full duplex and half duplex

3 Answers   Thomson Reuters,


How to Freeze svcgroup, (disable onl. & offl.)

2 Answers  


How to set passwd never expire for a user

4 Answers  


How to bring the Disk into diskgroup on veritas.

3 Answers  


What is the function of truss in solaris?

6 Answers  


How may will you find the process id and disk utilizations.

7 Answers  


Categories
  • Solaris Commands Interview Questions Solaris Commands (360)
  • Solaris Threads Interview Questions Solaris Threads (9)
  • Solaris IPC Interview Questions Solaris IPC (30)
  • Solaris Socket Programming Interview Questions Solaris Socket Programming (3)
  • Solaris System Calls Interview Questions Solaris System Calls (25)
  • Solaris General Interview Questions Solaris General (170)
  • Solaris AllOther Interview Questions Solaris AllOther (297)