Provided by: storebackup_3.5.2-1_all 

NAME
linkToDirs.pl - hard links files in directories with others
SYNOPSIS
linkToDirs.pl [--linkWith copyBackupDir] [--linkWith ...]
--targetDir targetForSourceDir
[--progressReport number[,timeframe]]
[--printDepth] [--dontLinkSymlinks]
[--ignoreErrors] [--saveRAM] [-T tmpdir]
[--createSparseFiles [--blockSize]]
[--maxHardLinks]
sourceDir ...
DESCRIPTION
Make a de-duplicated copy of files in one directory to another location. Utilizes hard links to the full
extent possible to avoid wasting storage space.
Usage note: whereas many file copy utilities have just two primary parameters (the source and
destination), linkToDirs.pl allows three primary parameters:
* source (sourceDir)
* destination (targetDir)
* and a reference location (linkWith [optional]) The reference location is the place to look for
existing content which can be hard linked to. Files with the same contents in sourceDir are hard linked
always in targetDir.
OPTIONS
--linkWith, -w
linkWith target; the backups where other backups have to be
linked to use this parameter multiple times for multiple
directories
if you do not use this option, the program will just copy and
link 'sourceDir'
--targetDir, -t
path(s) to directory where backups specified by
--sourceDir should be placed
--progressReport, -P
print progress report after each 'number' files
additional you may add a time frame after which a message is
printed
if you want to print a report each 1000 files and after
one minute and 10 seconds, use: -P 1000,1m10s
--printDepth, -D
print depth of actual read directory during backup
--dontLinkSymlinks
do not hard link identical symbolic links
--ignoreErrors, -i
if set, don't stop in case of errors when copying
--saveRAM
write temporary dbm files in --tmpdir
use this if you do not have enough RAM
--tmpdir, -T
directory for temporary files, default is </tmp>
--createSparseFiles, -s
if a file is indicated as a sparse file and that file has to be
copied, then external program 'cp' is called to copy that file
(gnucp / linux does some inspection about sparse files, if your
OS related version of cp does not support this functionality,
then this option will not work for you)
--blockSize
block size used to check if a file is / may be a sparse file
default is 512 bytes (which should be fine for most file systems)
sourceDir
path(s) to directories which have to be linked to other backups
use this parameter multiple times for multiple directories
--maxHardLinks
maximum number of hard links to use
zero (default) means limit depends on file system used only
COPYRIGHT
Copyright (c) 2012-2022 by Heinz-Josef Claes (see README). Published under the GNU General Public
License v3 or any later version
perl v5.40.1 2025-08-27 LINKTODIRS(1)