- Community Home
- >
- Servers and Operating Systems
- >
- Operating System - Linux
- >
- General
- >
- Hard vs Sym link
-
- Forums
-
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
- HPE Blog, Austria, Germany & Switzerland
- Blog HPE, France
- HPE Blog, Italy
- HPE Blog, Japan
- HPE Blog, Middle East
- HPE Blog, Russia
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
-
Blogs
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Blog, Latin America
- HPE Blog, Middle East
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
-
Information
- Community
- Welcome
- Getting Started
- FAQ
- Ranking Overview
- Rules of Participation
- Tips and Tricks
- Resources
- Announcements
- Email us
- Feedback
- Information Libraries
- Integrated Systems
- Networking
- Servers
- Storage
- Other HPE Sites
- Support Center
- Aruba Airheads Community
- Enterprise.nxt
- HPE Dev Community
- Cloud28+ Community
- Marketplace
-
Forums
-
Blogs
-
Information
-
English
- 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
- Email to a Friend
- Report Inappropriate Content
04-01-2008 03:58 AM
04-01-2008 03:58 AM
Share your knowledge, is there any PRACTICAL usage of Hard links ?
In a day-to-day administrative task do you guys ever found usage of hard link as a choice ?
Regards
Maaz
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-01-2008 04:25 AM
04-01-2008 04:25 AM
Solution- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-01-2008 05:47 AM
04-01-2008 05:47 AM
Re: Hard vs Sym link
There are some "special" things that you could do with hard links, but these things are not common.
For example, I remember somebody here asking, how to avoid the change of the inode number when a file is edited? The problem was, the editor create a temp file, delete the old file, and then move the temp file as a new file. Increasing the link count for the file with a hard link solved the problem for this user.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-01-2008 06:12 AM
04-01-2008 06:12 AM
Re: Hard vs Sym link
entry (name, path) for a file, just like the
first one.
It's more firmly attacted to the file than a
symbolic link. For example:
td176> echo xxx > file
td176> ln file hlink
td176> ln -s file slink
td176> ls -l
total 16
-rw-rw-rw- 2 antinode 513 4 Apr 1 10:02 file
-rw-rw-rw- 2 antinode 513 4 Apr 1 10:02 hlink
lrwxrwxrwx 1 antinode 513 4 Apr 1 10:02 slink -> file
td176> cat hlink
xxx
td176> cat slink
xxx
td176> mv file elsewhere
td176> cat hlink
xxx
td176> cat slink
cat: Cannot open slink: No such file or directory
Sometimes you may want one behavior. Other
times you may want the other behavior.
Saving a file from being deleted by some
program was the last thing I used a hard link
for, too.
Knowing nothing, I'd assume that a hard link
uses slightly less storage than a symbolic
link. (No link text to store.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-01-2008 10:15 AM
04-01-2008 10:15 AM
Re: Hard vs Sym link
For example, the Red Hat Enterprise Linux installer will mount the full path down to the source directory when you install from NFS. That prevents you from putting common files for different release levels in a single place and symlinking them in to the appropriate locations. However, hard links work fine and you still only have one copy of each file using real disk space.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-01-2008 03:12 PM
04-01-2008 03:12 PM
Re: Hard vs Sym link
HP-UX's LVM commands make a rather clever use of hard links.
Every command has a unique name, but of course, as hard links, they actually represent the same code. When the binary is executed it can evaluate the *name* of the file that invoked it and perform the appropriate operation.
The single letters used for switches can server different functional purposes without confusion and arguments can be added or subtracted without complication.
An alternative approach would be to use a common binary but pass an argument that would define the function to perform -- not nearly as clever in my opinion.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-02-2008 07:09 AM
04-02-2008 07:09 AM
Re: Hard vs Sym link
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-27-2008 03:19 AM
04-27-2008 03:19 AM
Re: Hard vs Sym link
As JRF says, I use hardlinks to deliver multiple compiler drivers. And the same for the man pages. Unfortunately I have to deliver them all on patches, where a symlink would be permanent and only delivered once.
Softlinks links are handy for directories if you want to move them to other filesystems.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-29-2008 06:52 AM
04-29-2008 06:52 AM
Re: Hard vs Sym link
In HP-UX the permission(777) of softlink does not matter and operation tried would be dealt/hanlded with the permission of the real file.
But i have a contracdiction here in Linux(RHEL AS) if the soft link file is 777 and if a dd operation is performed can over ride the permission of the real file.
Let us know if any one has a chance to test that behavour!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-29-2008 07:20 AM
04-29-2008 07:20 AM
Re: Hard vs Sym link
Hewlett Packard Enterprise International
- Communities
- HPE Blogs and Forum
© Copyright 2021 Hewlett Packard Enterprise Development LP