Following chains of symlinks
Sometimes one stumbles across a command that they probably should have known about for a while. Today, for me, that command is namei
‘follow a pathname until a terminal point is found’. As it says, one of the really nice things it can do is resolve chains of symlinks showing each link in the chain.
For example:
$ namei /usr/share/dict/words
f: /usr/share/dict/words
d /
d usr
d share
d dict
l words -> /etc/dictionaries-common/words
d /
d etc
d dictionaries-common
l words -> /usr/share/dict/american-english
d /
d usr
d share
d dict
- american-english
Incidentally, setting the dictionary to British (presuming only one dictionary that matches the regex ^british
is installed) can be done like this:
select-default-wordlist --set-default='^british'