![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Post Your Favorite UNIX/Linux Related RSS Feed Links | Neo | What's on Your Mind? | 0 | 12-23-2007 08:41 AM |
| Question posting links | hemangjani | UNIX for Dummies Questions & Answers | 5 | 02-25-2006 03:28 PM |
| Collection of Unix Links | Kriss | UNIX for Dummies Questions & Answers | 0 | 01-08-2006 02:06 AM |
| All Linux and Unix commands Links | devotedsinner | News, Links, Events and Announcements | 0 | 11-07-2005 03:49 AM |
| Unix History Question: Why are filenames/dirnames case sentsitive in Unix? | deckard | UNIX for Dummies Questions & Answers | 3 | 03-26-2005 09:59 AM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
A question for links in Unix
Is there a command that I can list, at once, all the links(path) of a give file ( including hard link and soft link)? If not, can it be down by writing a script? Thanks a lot.
(I know that pwd would only list one path.) |
| Forum Sponsor | ||
|
|
|
|||
|
I can't think of a way to list all the soft links.
To find the hard links, first run ls -li to find out the inode number of the file. Then do a find from the root of the file system (hard links do not cross mount points) for that inode. Example from a Solaris 10 box: Code:
> cd /usr/bin
> ls -li zcat
3262 -r-xr-xr-x 3 root bin 27176 Jan 22 2005 zcat
> find . -inum 3262
./compress
./uncompress
./zcat
>
__________________
[url=http://chuckb.1le.net/]My website[/url] |