1SYMLINKS(1) General Commands Manual SYMLINKS(1)
2
3
4
6 symlinks - symbolic link maintenance utility
7
9 symlinks [ -cdorstvC ] LINK|DIR ...
10
12 symlinks is a useful utility for maintainers of FTP sites, CDROMs, and
13 Linux software distributions. It scans directories for symbolic links
14 and lists them on stdout, often revealing flaws in the filesystem tree.
15
16 Each link is output with a classification of relative, absolute, dan‐
17 gling, messy, lengthy, or other_fs.
18
19 relative links are those expressed as paths relative to the directory
20 in which the links reside, usually independent of the mount point of
21 the filesystem.
22
23 absolute links are those given as an absolute path from the root direc‐
24 tory as indicated by a leading slash (/).
25
26 dangling links are those for which the target of the link does not cur‐
27 rently exist. This commonly occurs for absolute links when a filesys‐
28 tem is mounted at other than its customary mount point (such as when
29 the normal root filesystem is mounted at /mnt after booting from alter‐
30 native media).
31
32 messy links are links which contain unnecessary slashes or dots in the
33 path. These are cleaned up as well when -c is specified.
34
35 lengthy links are links which use "../" more than necessary in the path
36 (eg. /bin/vi -> ../bin/vim) These are only detected when -s is speci‐
37 fied, and are only cleaned up when -c is also specified.
38
39 other_fs are those links whose target currently resides on a different
40 filesystem from where symlinks was run (most useful with -r ).
41
43 -c convert absolute links (within the same filesystem) to relative
44 links. This permits links to maintain their validity regardless
45 of the mount point used for the filesystem -- a desirable setup
46 in most cases. This option also causes any messy links to be
47 cleaned up, and, if -s was also specified, then lengthy links
48 are also shortened. Links affected by -c are prefixed with
49 changed in the output.
50
51 -d causes dangling links to be removed.
52
53 -o fix links on other filesystems encountered while recursing.
54 Normally, other filesystems encountered are not modified by sym‐
55 links.
56
57 -r recursively operate on subdirectories within the same filesys‐
58 tem.
59
60 -s causes lengthy links to be detected.
61
62 -t is used to test for what symlinks would do if -c were specified,
63 but without really changing anything.
64
65 -v show all symbolic links. By default, relative links are not
66 shown unless -v is specified.
67
68 -C chroot to current directory before looking at dirlist. You need
69 to be root for the chroot() call to work, and all paths given as
70 args must be relative to the current directory.
71
73 symlinks does not recurse or change links across filesystems.
74
76 symlinks has been written by Mark Lord <mlord@pobox.com>, the original
77 developer and maintainer of the IDE Performance Package for linux, the
78 Linux IDE Driver subsystem, hdparm, and a current day libata hacker.
79
81 symlink(2)
82
83
84
85Version 1.7 Jan 2020 SYMLINKS(1)