Hi, I wrote on 2011-08-08 19:34:27 +0200 [Re: [BackupPC-users] Too many links : where is the problem ?]: > [...] > % # go to a directory on the partition you are interested in, make sure > you have write access > % mkdir linktest > % cd linktest > % touch 1 > % perl -e 'for (my $i = 2; ; $i ++) { link "1", $i or die "Cant create > ${i}th link: $!\n"; }' > > (this answer is also valid for any other (UNIX type) OS/FS).
correction: this probably won't work on ZFS, where the link counts can probably become so large that any really existing disk won't be large enough to hold the directory entries needed to exceed the maximum ;-), and it will also fail on other file systems where the count can become so large that Perl will use value representations like '1e+15' in $i (the second link named '1e+15' obviously won't be able to be created). Then again, BackupPC also won't handle limiting link counts to such high values too well, so it's probably best to keep HardLinkMax <= 999999999999999 even if you should encounter a FS that permits more. Not that you're likely to ever reach that limit anyway ... What this really means is that you should probably limit $i to some sane value in the for() loop so you don't wait forever on file systems permitting huge numbers of hard links. Regards, Holger ------------------------------------------------------------------------------ BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA The must-attend event for mobile developers. Connect with experts. Get tools for creating Super Apps. See the latest technologies. Sessions, hands-on labs, demos & much more. Register early & save! http://p.sf.net/sfu/rim-blackberry-1 _______________________________________________ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List: https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki: http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/