SYMLINKS(1)

πŸ“¦
version 1.7 Β· 2 versions
, in centos-stream 10, centos-stream 9, fedora 43, fedora 44

okay bestie, come sit with me because we're talking about symlinks(1) from the General Commands Manual and honestly? she's a whole vibe. πŸ’…


πŸ¦‹ NAME πŸ¦‹

symlinks β€” the symbolic link maintenance utility. yes queen, link upkeep, it's giving tidy filesystem energy πŸŽ€


🌸 SYNOPSIS 🌸

symlinks [ -cdorstvC ] LINK|DIR ...

πŸ’– DESCRIPTION πŸ’–

so like, symlinks is this genuinely iconic little utility made for the girlies and bros who maintain FTP sites, CDROMs, and Linux software distributions. she scans directories for symbolic links and lists them on stdout, and lowkey she's always exposing flaws in the filesystem tree like a friend who notices your ex in the group photo. 😭

every link gets output with a classification, and the options are relative, absolute, dangling, messy, lengthy, or other_fs. let's break them down, no cap:

  • relative links are the ones expressed as paths relative to the directory where the links themselves live. usually independent of the mount point of the filesystem β€” she's flexible, she adapts, main character energy fr. ✨
  • absolute links are the ones given as an absolute path from the root directory, as indicated by a leading slash (/). committed to the whole journey, love that for her. πŸ‘‘
  • dangling links are links whose target does not currently exist. this commonly happens with absolute links when a filesystem is mounted somewhere other than its customary mount point β€” for example when the normal root filesystem is mounted at /mnt after booting from alternative media. it's giving ghosted. πŸ’€
  • messy links are links containing unnecessary slashes or dots in the path. these get cleaned up too when -c is specified. she's a little unkempt but we can fix her πŸ™ˆ
  • lengthy links are links that use ../ more than necessary in the path (eg. /bin/vi -> ../bin/vim). these are only detected when -s is specified, and only cleaned up when -c is also specified. two-step process, periodt. ⭐
  • other_fs are those links whose target currently resides on a different filesystem from where symlinks was run. most useful with -r. 🌈

πŸ’… OPTIONS πŸ’…

  • -c β€” convert absolute links (within the same filesystem) to relative links. this lets links maintain their validity regardless of the mount point used for the filesystem β€” a desirable setup in most cases, ngl. this option also causes any messy links to be cleaned up, and, if -s was also specified, then lengthy links are also shortened. links affected by -c get prefixed with changed in the output. she's a fixer, she's a healer 🫢
  • -d β€” causes dangling links to be removed. bye boo, you don't exist πŸ‘‹
  • -o β€” fix links on other filesystems encountered while recursing. normally, other filesystems encountered are not modified by symlinks. respect the boundaries unless you say otherwise πŸ’œ
  • -r β€” recursively operate on subdirectories within the same filesystem. she goes deep, but only within her own lane. πŸŒ€
  • -s β€” causes lengthy links to be detected. πŸ”
  • -t β€” is used to test for what symlinks would do if -c were specified, but without really changing anything. it's a dress rehearsal, a vibe check, a dry run before the actual slay. ✨
  • -v β€” show all symbolic links. by default, relative links are not shown unless -v is specified. she's shy until you ask nicely. πŸ™ˆ
  • -C β€” chroot to current directory before looking at dirlist. you need to be root for the chroot() call to work, and all paths given as args must be relative to the current directory. big girl permissions only, know your limits bestie πŸ‘‘

πŸ› BUGS πŸ›

symlinks does not recurse or change links across filesystems. she said "not my jurisdiction" and honestly? boundaries. 🚧


πŸ‘‘ AUTHOR πŸ‘‘

symlinks has been written by Mark Lord <mlord@pobox.com>, the original developer and maintainer of the IDE Performance Package for linux, the Linux IDE Driver subsystem, hdparm, and a current day libata hacker. a literal legend, an icon, a pioneer β€” we stan a low-level kernel king πŸ«‘πŸ’–


πŸ”— SEE ALSO πŸ”—

symlink(2)


and that's the whole page bestie!! this was Version 1.7, dated Jan 2020 β€” go forth and fix those links, you absolute icon πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from