Date: Fri, 25 Aug 2017 02:32:37 +0200 From: Polytropon <freebsd@edvax.de> To: Manish Jain <bourne.identity@hotmail.com> Cc: "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org> Subject: Re: Anything specific to keep in mind restoring from rsync ? Message-ID: <20170825023237.9b6b22b2.freebsd@edvax.de> In-Reply-To: <VI1PR02MB1200FC78BA6AFD1C93CA9323F69B0@VI1PR02MB1200.eurprd02.prod.outlook.com> References: <VI1PR02MB1200E48789933A9BCAAAECD4F6800@VI1PR02MB1200.eurprd02.prod.outlook.com> <20170818074902.GA91334@gmail.com> <VI1PR02MB1200A074E97E82E758827E91F6800@VI1PR02MB1200.eurprd02.prod.outlook.com> <alpine.BSF.2.21.1708241026360.23386@wonkity.com> <VI1PR02MB1200FC78BA6AFD1C93CA9323F69B0@VI1PR02MB1200.eurprd02.prod.outlook.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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). -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170825023237.9b6b22b2.freebsd>