- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: List linked files
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
04-26-2001 08:18 AM
04-26-2001 08:18 AM
Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2001 08:25 AM
04-26-2001 08:25 AM
Re: List linked files
# find
...for example:
# find /etc -type l
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2001 08:29 AM
04-26-2001 08:29 AM
Solution# find / -type l
If you want to find the hardlinks to a specific file, e.g. /sbin/lvchange
# cd /
# ls -li /sbin/lvchange
255 lr-sr-xr-t 1 root sys 14 Aug 20 1998 lvchange@ -> /sbin/lvchange
# find . -inum 255 -xdev
(xdev is necessary since the inode number is only unique in this filesystem).
Carsten
In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move. -- HhGttG
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2001 08:34 AM
04-26-2001 08:34 AM
Re: List linked files
find . -type f -links +1
if you are looking for for directories (since they always have at least 2)
find . -type d -links +2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2001 09:27 AM
04-26-2001 09:27 AM
Re: List linked files
I had frankly ignored hardlinks and assumed that you were interested in tracking only symbolic ones since symbolic links allow you to cross filesystem boundries.
Carsten & Clay's contributions stimulated my thinking again, and here's another thought for viewing your system:
# cd /sbin
# ls -ilR | awk '$2 ~/l/ || ($2 !~/d/ && $3 > 2)' | sort -k1n | more
This will produce a list of symbolic links and all files that are hardlinked, sorted by inode number. Obviously, as Carsten noted, you will want to analyze one filesytem at a time.
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2001 10:14 AM
04-26-2001 10:14 AM
Re: List linked files
Sorry James, you only get one "10" pointer evern though you replied twice.
-TFG-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2001 04:42 AM
04-27-2001 04:42 AM
Re: List linked files
A typo, and hence a correction:
ls -ilR | awk '$2 ~/l/ || ($2 !~/d/ && $3 > 1)' | sort -k1n | more
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2001 05:44 AM
04-27-2001 05:44 AM
Re: List linked files
Does it's name come from awkward?
Later,
Bill
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2001 04:58 AM
05-02-2001 04:58 AM
Re: List linked files
Just be glad you don't have to work with an AS400 system (or do you??). They seem to have an aversion -for the most part- to vowels in their commands (WRKSPLF, CPYFRMQRYF... yuck!). ;)