Timeline for How do I see what symlinks exist for a given directory?
Current License: CC BY-SA 3.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 15, 2016 at 8:48 | history | edited | Stéphane Chazelas | CC BY-SA 3.0 | Missing -P. `exec pwd` may not work either (wouldn't in POSIX compliant pwds) |
| Jun 15, 2016 at 8:42 | comment | added | Stéphane Chazelas | Note that -ef has been requested be added to POSIX as it's widely supported. | |
| Jun 15, 2016 at 8:35 | comment | added | Stéphane Chazelas | For find -L /haystack -xtype l -exec ksh..., ITYM find /haystack -type l -exec ksh... unless you do intend to descend into symlinks to directories (in which case you'd have used *** in zsh). | |
| Nov 3, 2010 at 19:53 | comment | added | Gilles 'SO- stop being evil' | @user394: I don't understand the requirement in your comment, there are several ambiguous “it”s and “the”s. Could you reformulate it more clearly, perhaps with examples? | |
| Nov 3, 2010 at 19:41 | comment | added | user394 | Okay, this is actually what I need in my case. In a single directory with no recursion, I want to see if any symlinks to it also reside in that directory, so I know whether deleting it will cause any breakage. Will find -L ./ -xtype l -samefile /target do the trick? If I wrapped it in a foreach() covering each file, I could search all the files for symlinks to them, right? | |
| Nov 2, 2010 at 19:22 | history | answered | Gilles 'SO- stop being evil' | CC BY-SA 2.5 |