SYMLINKS(8)

πŸ“¦
version 1.4.3 Β· 2 versions
, in arch rolling, nixos 26.05, nixpkgs unstable

okay bestie, so this is symlinks, from the System Manager's Manual β€” a symbolic link maintenance utility. yes, it's giving "old school sysadmin" but honestly it's so useful. let's get into it πŸŽ€


✨ NAME ✨

symlinks β€” the symbolic link maintenance utility πŸ’« (yes that's the whole name, she's modest)


πŸ¦‹ SYNOPSIS πŸ¦‹

symlinks [ -cdorstv ] dirlist

🌸 DESCRIPTION 🌸

so symlinks scans directories for symbolic links and lists them on stdout β€” and honestly? it's lowkey a broken-link detective πŸ” it's often revealing broken links in the filesystem tree, which is the whole vibe check.

every link gets output with a classification, and there are six: relative, absolute, dangling, messy, lengthy, or other_fs. slay, let's break each one down πŸ’…

  • relative links β€” these are expressed as paths relative to the directory in which the links reside. usually independent of the mount point of the filesystem. very chill, very portable 🫢
  • absolute links β€” these are given as an absolute path from the root directory as indicated by a leading slash (/). main character energy, zero flexibility.
  • dangling links β€” 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). yeah. that's the sad one.
  • messy links β€” links which contain unnecessary slashes or dots in the path πŸ™ˆ these get cleaned up as well when -c is specified.
  • lengthy links β€” 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. so yes, you need both. team work.
  • other_fs β€” those links whose target currently resides on a different filesystem from where symlinks was run (most useful with -r). crossing the boundary fr fr 🌈

πŸ‘‘ OPTIONS πŸ‘‘

  • -c β€” convert absolute links (within the same filesystem) to relative links ✨ this permits links to maintain their validity regardless of the mount point used for the filesystem β€” a desirable setup in most cases, no cap. 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 are prefixed with changed in the output πŸŽ€
  • -d β€” causes dangling links to be removed πŸ’€ bye bestie
  • -o β€” fix links on other filesystems encountered while recursing. normally, other filesystems encountered are not modified by symlinks. so this is you giving explicit permission 🫑
  • -r β€” recursively operate on subdirectories within the same filesystem 🌳
  • -s β€” causes lengthy links to be detected πŸ”
  • -t β€” used to test for what symlinks would do if -c were specified, but without really changing anything πŸ™ˆ the ultimate "what if" simulator, zero commitment
  • -v β€” show all symbolic links. by default, relative links are not shown unless -v is specified πŸ‘€

πŸ’€ BUGS πŸ’€

  • symlinks does not recurse or change links across filesystems. periodt. that's the limit, she said no. 😭

🫢 AUTHOR 🫢

symlinks was created by Mark Lord <mlord@pobox.com>. the current maintainer is J. Brandt Buckley <brandt@runlevel1.com>. legends, both of them πŸ‘‘


πŸ”₯ SEE ALSO πŸ”₯


okay that's the whole thing bestie, go forth and fix those links πŸ’–βœ¨πŸ¦‹

Version 1.4.3 β€” April 2014 β€” SYMLINKS(8), from the System Manager's Manual πŸŽ€ that's the source, the version, and the date all in one cute little sign-off, iykyk πŸ’œ

πŸ“¦ where this page comes from