(responding to Ed)
> From memory.....
> I recall they link places such as
> /usr/include and others which would be needed
> to
properly generate
a stack trace.
Hmmm... This gives me an idear. Let me try something. I'll vi
the output from
ls -alR | grep "^l" > output.txt
I'll list my steps below in case something I do doesn't do what
I think. (there may be typos in what follows. there were
mis-steps, I did not include those)
1. :1,$s/^...........// (removes permissions string from
beginning of each line)
2. :1,$s/^ \+1 abrt abrt// (removes variable number of spaces
and "1 abrt abrt) from beginning of each line)
3. :1,$s/^ \+ \d\+ \a\a\a \+\d\+ \+....// (removes variable
number of spaces, 1 or 2 digit number, variable number of
spaces, and date from beginning of each line)
4. :1,$s/ \S\+ -> // (removes space, file or directory
name, and " -> " from beginning of each line) Each line
should now contain only the destination of each link, what each
link was pointing to. I notice that many lines now start with
repeats of "../", but many do not (that's odd!).
The above 4 steps altered every line in the file.
5. Now I'm gonna assume that all the "../" repeats take us to
'/', and try to replace those with'/'. This should make each
file or path absolute.
:1,$s/^\(\.\.\/\)\+/ROOT/:1,$s/
That was difficult. Changed 12380 out of 13827 lines, so only
12380 links were to a different path.
6. :1,$s/ROOT/\// (changes "ROOT" at the beginning of the line
to '/'; results after this step
are saved into a separate file)
Now how can I get the names off the end of each line?
End-of-line names have letters, digits,'-', '+', '_', and '.';
hopefully no others. Unfortunately, in some cases, there's no
way of knowing whether the name is a file name or a directory
name.
7. :1,$s/[a-zA-Z0-9\.\_\-\+]\+$// (removes file (and
directory?) names from end of each line; results after this step
are saved into a separate file)
Now I want to sort the results and remove duplicate lines.
8. sort -f link_destdirs.txt > destdirs_sorted.txt
9. uniq -c destdirs_sorted.txt > unique_destdirs.txt
I fpasted the results here:
"https://paste.centos.org/view/6dc39f3d"
Summary:
* Ed was partially correct: many of the links point to somewhere
under "/usr/", but none to "/usr/include/" or anywhere
underneath.
* Some of the links seem to point to somewhere under
/.build-id/", but I'm suspicious that the process used above
might be mis-leading us on this. I don't see a ".build-id"
under '/' on my system.
* Many of the links point to somewhere under "/lib64/".
* Some of the links point to somewhere under "/libexec/"
(suspicious).
* Other destinations listed are "/.dwz/" (suspicious), "/bin/",
"/sbin/", "/share/" (suspicious), "/system-generators/"
(suspicious), "/systemd/" (suspicious), and, "/udev/"
(suspicious).
* 997 of the links seem to not point to some other directory.
* Overall, there appears to be 1243 different link destinations.
The suspicious results may be because I made wrong assumptions
in steps 4 and 5. My comment between steps 6 and 7 might also
be relevant.
It took a few hours to figure out the above process. That's as
much of an answer as I can give to Samuel's question:
> Where do they link to?
Is there a way of getting a better answer?
So how do I safely get rid of everything under
/var/cache/abrt-di/usr/, including what the 13800+ links are
pointing to?
thanks,
Bill.