LINKTODIRS(1)
π linkToDirs.pl β LINKTODIRS(1) π
okay bestie, sit down, hydrate, and let me tell you about linkToDirs.pl β a Perl script that hard links files in directories with others. she's giving storage-saving icon behavior and honestly? we're obsessed. π
β¨ SYNOPSIS β¨
linkToDirs.pl [--linkWith copyBackupDir] [--linkWith ...]
--targetDir targetForSourceDir
[--progressReport number[,timeframe]]
[--printDepth] [--dontLinkSymlinks]
[--ignoreErrors] [--saveRAM] [-T tmpdir]
[--createSparseFiles [--blockSize]]
[--maxHardLinks]
sourceDir ...
no cap, that's the whole vibe right there. π
πΈ DESCRIPTION πΈ
so what she does is: make a de-duplicated copy of files in one directory to another location. she utilizes hard links to the full extent possible to avoid wasting storage space. like, ALL the extent. she is not leaving a single hard link on the table, periodt. β¨
usage note, and this is the tea π: whereas many file copy utilities have just two primary parameters (the source and the 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. literally always. no exceptions, no take-backs, main character energy only. π
π OPTIONS π
--linkWith,-wβ linkWith target; the backups where other backups have to be linked to π« use this parameter multiple times for multiple directories. and bestie, if you do not use this option, the program will just copy and linksourceDir.--targetDir,-tβ path(s) to directory where backups specified by--sourceDirshould be placed π--progressReport,-Pβ print a 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β cute, right?? π¦--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 π«Ά (yes she'll just keep going, she's resilient like that)--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 programcpis called to copy that file π§ (gnucp / linux does some inspection about sparse files, if your OS related version ofcpdoes not support this functionality, then this option will not work for you β read that again bestie, it's conditional)--blockSizeβ block size used to check if a file is / may be a sparse file π default is512bytes (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 (0, the default) means the limit depends on the 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. π
and that's the whole page, bestie β perl v5.40.1, dated 2026-05-23, from the LINKTODIRS(1) of it all. go forth and link responsibly. mwah. πβ¨π
π¦ where this page comes from
- ubuntu stonking: storebackup 3.5.2-2 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms