RE: all softlinks to a given file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





-----Original Message-----
From:	fedora-list-bounces@xxxxxxxxxx on behalf of Matthew Miller
Sent:	Fri 09/28/2007 04:20 PM
To:	For users of Fedora
Cc:	
Subject:	Re: all softlinks to a given file

On Fri, Sep 28, 2007 at 10:08:32PM +0200, Zoltan Szabo wrote:
> Do you know an easy (fast) way to find all the softlinks to a given
> file, using Fedora?
> Example: in case of "S1 -> F, ...., SN -> F" the task is to find
> S1, ..., SN given file F.
> Any idea is appreciated,


  find . -lname F

----------------------------
Matt -

I tried that, but it's not foolproof:

% ls -li
3815190 -rw-r--r-- 1 jminer iis  0 Sep 28 16:21 F
3815193 lrwxrwxrwx 1 jminer iis  1 Sep 28 16:22 S1 -> F
3815215 lrwxrwxrwx 1 jminer iis 11 Sep 28 16:23 S2 -> ../jminer/F
% ls -Lli
3815190 -rw-r--r-- 1 jminer iis 0 Sep 28 16:21 F
3815190 -rw-r--r-- 1 jminer iis 0 Sep 28 16:21 S1
3815190 -rw-r--r-- 1 jminer iis 0 Sep 28 16:21 S2
% find . -lname F -print
./S1

It doesn't match S2 because the "names" don't match. However, it is a short and sweet solution, depending on what the OP intended.  

<<winmail.dat>>

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux