Symbolic and hard links
cheat sheet · Linux https://lab.dimsanych.ru/en/wiki/links/Cheat sheet
-
ln -s target linksymbolic (the usual kind) -
ln -sfn target linkdirrecreate a symlink (to a directory — needs -n!) -
readlink -f linkthe real target -
find . -xtype lbroken symlinks -
ln target hardlinkhard link (same filesystem, same inode) -
cp -P link dstkeep the link itself when copying -
cp -a src dstarchive mode: links stay as links