Anything specific to keep in mind restoring from rsync ?

Polytropon freebsd at
Fri Aug 25 00:33:06 UTC 2017

On Fri, 25 Aug 2017 00:13:38 +0000, Manish Jain wrote:
> But I am inclined to ask one question here : does FreeBSD actually have 
> any system-installed hard links (other than . and ..) ?

Several. A good example is the content of /rescue, where all
programs are in fact the same (one) binary, hardlinked to
several names. Use "ls -i" to verify - they all have the same
inode number. Furthermore, /bin/test and /bin/[; /bin/rm and
/bin/unlink; /bin/ln and /bin/link. There are even more in
/usr/bin. Several ports also install hardlinked files, and
it's not entirely uncommon that they also exist at user level,
inside a user's home directory.

Here's a sh one-liner where you can set $SP ("search path")
and see which hard links do exist, sorted by inode number.

	SP="/usr/bin"; for INODE in `ls -i ${SP} | sort -n | awk '{ print $1 }' | uniq -d`; do ls -i ${SP} | grep ${INODE}; echo ""; done

Additionally, dump | restore handles special flags in the
desired manner (such as the schg flag; see "man chflags" for
details). That's why it's the preferred method to make 1:1
file system content copies on UFS (not _clone_ whole disks
and partitions, though).

Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

More information about the freebsd-questions mailing list