On Wed, Dec 4, 2024 at 4:55 PM Stephen Morris <steve.morris...@gmail.com> wrote:
>
> Hi,
>     Following DNF producing message about dangling symlinks again even though 
> I removed dangling symlinks a couple of days ago, I ran "sudo symlinks -r / | 
> grep -i dangling" which showed dangling lock symlinks for Firefox and 
> Thunderbird and 5 dangling symlinks for a ".build-id" folder. So to get rid 
> of them I ran "sudo symlinks -r -d /" which showed screens and screens of 
> messages similar to the sample ones below, hence what was it actually doing?
>
> messy:    /usr/share/icons/breeze-dark/preferences/32/krunner.svg -> 
> ./plasma-search.svg
> messy:    /usr/share/icons/breeze-dark/preferences/32/ksmserver.svg -> 
> ./preferences-system-login.svg
> messy:    /usr/share/icons/breeze-dark/preferences/32/plasmagik.svg -> 
> ./preferences-desktop-plasma.svg
> messy:    /usr/share/icons/breeze-dark/preferences/32/plasmashell.svg -> 
> ./preferences-desktop-plasma.svg
> messy:    /usr/share/icons/breeze-dark/preferences/32/system-lock-screen.svg 
> -> ./preferences-desktop-user-password.svg
> absolute: /usr/share/kde4/apps/kssl/ca-bundle.crt -> 
> /etc/pki/tls/certs/ca-bundle.crt
> absolute: /usr/share/licenses/texlive-gsftopk/gpl.txt -> 
> /usr/share/texlive/licenses/gpl.txt
> absolute: /usr/share/licenses/texlive-luatex/gpl2.txt -> 
> /usr/share/texlive/licenses/gpl2.txt
> other_fs: /var/lib/snapd/snap/bare/current -> 5
> other_fs: /var/lib/snapd/snap/acrordrdc/current -> 62
> other_fs: /var/lib/snapd/snap/gtk-common-themes/current -> 1535
> other_fs: /var/lib/snapd/snap/gnome-3-28-1804/current -> 198
> other_fs: /var/lib/snapd/snap/wine-platform-runtime/current -> 392
> o
>
>     Just relative to the symlink command, the documentation for running that 
> command as part of system upgrade post process says to run "symlinks -r /usr 
> | grep dangling", why "/usr", why not "/"?

Let me look that up for you.

$man symlinks

SYMLINKS(1)                General Commands Manual               SYMLINKS(1)

NAME
       symlinks - symbolic link maintenance utility

SYNOPSIS
       symlinks [ -cdorstv ] dirlist

DESCRIPTION
       symlinks  is  a  useful utility for maintainers of FTP sites, CDROMs,
       and Linux software distributions.  It scans directories for  symbolic
       links and lists them on stdout, often revealing flaws in the filesys‐
       tem tree.

       Each link is output with a classification of relative, absolute, dan‐
       gling, messy, lengthy, or other_fs.

       relative links are those expressed as paths relative to the directory
       in which the links reside, usually independent of the mount point  of
       the filesystem.

       absolute  links are those given as an absolute path from the root di‐
       rectory as indicated by a leading slash (/).

       dangling links are those for which the target of the  link  does  not
       currently  exist.   This  commonly  occurs  for absolute links when a
       filesystem is mounted at other than its customary mount  point  (such
       as  when  the normal root filesystem is mounted at /mnt after booting
       from alternative media).

       messy links are links which contain unnecessary slashes  or  dots  in
       the path.  These are cleaned up as well when -c is specified.

       lengthy  links  are  links which use "../" more than necessary in the
       path (eg.  /bin/vi -> ../bin/vim) These are only detected when -s  is
       specified, and are only cleaned up when -c is also specified.

       other_fs  are those links whose target currently resides on a differ‐
       ent filesystem from where symlinks was run (most useful with -r ).
       ...

Be careful of cleaning up messy links. If you run `symlinks -c` over
/etc/systemd, the system probably will not boot. Or that's what
happened in the past to me. I did not investigate why.

Jeff
-- 
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to