Listing Files that shares the same link
I need help with listing a file and its link (symbolic).
I tried Code:
ls -HUl filename Is there anyway that this can be done? Thanks in advance for any help! :) :newbie: -Leon |
Welcome to LQ.
Do you mean that you jsut want to see where the link goes? Just use: ls -l /path/to/symlink |
Nah... say I know file1 has a link
How do I list the names/path of all the links that links to file1 ??? -Leon |
Ah - see what you mean. You cna use find:
find -lname file1 EDIT: To search your entire drive not just from the dir you are in: find / -lname file1 |
Hm... that didn't work :(
Is there a way I can just grep the i-node numbers and just say they're the same so they're linked together...? lol *sigh* I created a file with 4 links to test it out... same inode numbers when I executed the find command, it returned nothing.. does that only works with Hard links?? :'( |
It worked fine for my symlinks. What command did you issue? Did you see my edit about seaching the entire system?
|
all my linked files are in my ~/
I made 4... ln file1 file2 cp -l file1 file3 and ln for the rest then I used find ~/ -lname file1 all I get back was $(...blankingcursorgoeshere...) |
Looks like I made a boo boo, it's a hard link... lol Sorry :(
So back to square one *sigh* |
All times are GMT -5. The time now is 01:23 PM. |