- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Hard vs Sym link
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
Discussions
Discussions
Discussions
Forums
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
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
тАО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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- Report Inappropriate Content
тАО04-29-2008 07:20 AM
тАО04-29-2008 07:20 AM