- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Doubt on ln command
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
09-02-2002 02:17 AM
09-02-2002 02:17 AM
I have a file which has a link count of 2. Is there any way I can figure out the two links that reference this file?
Thanks.
Regards,
Ram.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2002 02:24 AM
09-02-2002 02:24 AM
Re: Doubt on ln command
1. Do an ll command against the file and note the minor number ie - 0x0f005c
2. Enter this command -
ll -R / |grep 0x0f005c
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2002 02:30 AM
09-02-2002 02:30 AM
Re: Doubt on ln command
You can try with find:
find / -type l -name "filename" -u "ownername" -print
Regards,
Justo.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2002 02:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2002 02:39 AM
09-02-2002 02:39 AM
Re: Doubt on ln command
You can do a ll -i to see the inode number of the file (first column) and then search for files with the same inode number.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2002 02:46 AM
09-02-2002 02:46 AM
Re: Doubt on ln command
Hi,
Do the following. Lets say your filename
is file1.txt
ls -li file1.txt
This will show you the inode number which
you then use in a find command:
find
The startpoint should be the mountpoint of the
filesystem holding file1.txt.
As the link-count is 2 this command should
return two hits, file1.txt beeing one of them.
Regards
Olav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2002 03:30 AM
09-02-2002 03:30 AM
Re: Doubt on ln command
Justo,
the -u switch does not seem to work on HP-UX 11.0.
Regards,
Ram.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2002 08:14 AM
09-02-2002 08:14 AM
Re: Doubt on ln command
Sorry the option is -user uname.
You can see it in the manpage for find.
Regards,
Justo.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2002 08:28 AM
09-02-2002 08:28 AM
Re: Doubt on ln command
a5:/tmp 105 # banner Help > xx
a5:/tmp 106 # ln xx yy
a5:/tmp 107 # ls -il xx
183 -rw-rw-rw- 2 merijn softwr 232 Sep 2 18:33 xx
a5:/tmp 108 # ncheck -i 183 /dev/vg00/tmp
/dev/vg00/tmp:
183 /xx
183 /yy
a5:/tmp 109 #