- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- what is the difference between softlink and hardli...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2004 05:35 PM
11-19-2004 05:35 PM
what is the difference between softlink and hardlink
Hi,
what is the difference between softlink and hardlink ?
Normally from target dir we create link for a file or dir as like below
ln -s /home/testfile1
I came to know that this softlink.
But I do n't know the difference between them.
BTW, how to create hard link.
Thanks
Ezhil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2004 05:38 PM
11-19-2004 05:38 PM
Re: what is the difference between softlink and hardlink
SOftlink can link both files and directories which may or may not belong to same filesystems whereas Hardlink can be created for only those files that are in same filesystem.
You can't create hardlink across the filesystems, you have to create softlink in that case.
Hope that helps.
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2004 06:57 PM
11-19-2004 06:57 PM
Re: what is the difference between softlink and hardlink
The main difference between hard and soft link is the following: hard link is a real file and a soft link is a pointer to a file.
If FILN is a file; so after
ln FILN HFILN
ln -s FILN SFILN
rm FILN
HFILN exists as contains all data before removing
SFILN has nothing
Additional difference is that soft link can be built across file systems.
HTH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2004 07:28 PM
11-19-2004 07:28 PM
Re: what is the difference between softlink and hardlink
HTH.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2004 07:44 PM
11-19-2004 07:44 PM
Re: what is the difference between softlink and hardlink
Link file are the files which actually a pinter to it's master file or directory.
1.In the case of a Hard Link the link to a file or directory can be crated and used only in the same filesystem.You cannot have the main file to be reside in one filesystem and it's link in an another file system.
2.Softlinks are also called as symbolic links.Softlinks can cross the filsystem boundaries.
ie a link can pint to a file or diretciry which resides in any of the filesystem .
Softlink can be created using ln with -s switch where hardlink is created by ln without any switches.
Hope u are clear now
regards
SK
sunilhcl@rediffmail.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2004 12:53 AM
11-22-2004 12:53 AM
Re: what is the difference between softlink and hardlink
a hardlink is a reference to the physical sector that contains the information on the filesystem. all files have at least one hardlink, and thatâ s how they appear on the tree. For instance, /etc/fstab is a hardlink to some inode on some filesystem that contains the filesystem table. if you were to hardlink /etc/someotherfstab, it point to the same inode.
a softlink, or symbolic link, is a reference to a specific path in the file tree. it is essentially a special file that contains the path to another file that is "dereferenced" by the kernel (i think, could be shell) before it is passed to the calling program. it contains no information.
because hardlinks reference the physical sectors, they cannot cross filesystems. because softlinks are dereferenced by the kernel, they may not always point to the same information if mounted on different trees.
imagine the instance where you have a softlink to /etc/fstab on a removable disk (like a floppy). no matter what system you mounted it on, it would always point to /etc/fstab on the local sys