- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to identify the harlink file
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
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-22-2009 11:32 PM
тАО04-22-2009 11:32 PM
How to identify the harlink file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-22-2009 11:41 PM
тАО04-22-2009 11:41 PM
Re: How to identify the harlink file
do you mean a hard link ? If so, then use ls -i and the two files should have the same inode number.
J.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-23-2009 12:09 AM
тАО04-23-2009 12:09 AM
Re: How to identify the harlink file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-23-2009 12:17 AM
тАО04-23-2009 12:17 AM
Re: How to identify the harlink file
There is no difference, except what's in your mind, if you created it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-23-2009 12:49 AM
тАО04-23-2009 12:49 AM
Re: How to identify the harlink file
J.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-23-2009 01:42 AM
тАО04-23-2009 01:42 AM
Re: How to identify the harlink file
both are having same inode number.And if you are making any changes to one of the file the other one also get changed.But if you delete one file the other one will not get deleted.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-23-2009 02:08 AM
тАО04-23-2009 02:08 AM
Re: How to identify the harlink file
For a hard link to be created use ln and for softlink use ln -s
by looking at the inode number you can verify whether it is hardlink or softlink
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-23-2009 02:58 AM
тАО04-23-2009 02:58 AM
Re: How to identify the harlink file
Give "ls -l" to se the link file.
Suraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-23-2009 08:31 AM
тАО04-23-2009 08:31 AM
Re: How to identify the harlink file
Hardlink is --
(1)Multiple name given to same data in same file system.
(2)eg
ln /tmp/a /tmp/b
here to check the hard link
cd /tmp
ls -l check ' l ' symbol for b
Regards,
Subodh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-24-2009 06:58 AM
тАО04-24-2009 06:58 AM
Re: How to identify the harlink file
# touch test
# ln test test2
# ls -li test*
98314 -rw-r--r-- 2 pranksterr users 0 2009-04-24 16:51 test
98314 -rw-r--r-- 2 pranksterr users 0 2009-04-24 16:51 test2
# rm test
# ls -li test*
98314 -rw-r--r-- 1 pranksterr users 0 2009-04-24 16:51 test2
the 3rd field right after the permissions in the output of ll/ls -l is the link count.
the -i option tells ls to show the inode numbers too. you can see that after i created a hard link (ln without -s) the link count were 2, and in the first field the inode numbers were matched. just think about it like you have the data on the disk only once, but you have a reference in two places.
after i deleted one of the link, the other remained and the link count were accordingly 1.
and a little note: hard link (without -s) are only allowed in a single filesystem, if you want to have link to another filesystem then you instead must make a symlink with 'ln -s'. (that's because the inode number is only uniqe in a single FS.)
Unix operates with beer.