How to Force aria2 to Verify a Torrent File?
Using the command-line download utility aria2 to check the integrity of an existing file against a torrent without triggering any data download is a straightforward process achieved by combining specific configuration flags. By default, aria2 will automatically attempt to download any missing or corrupted pieces it finds during a hash check. To prevent this behavior and force the utility into a strict verification-only mode, you must pair the file validation command with flags that explicitly restrict network downloads.
Step-by-Step Verification Command
To verify your local files against a .torrent file
without downloading anything, open your terminal and run the following
command:
aria2c --check-integrity=true --dry-run=true /path/to/your/file.torrent
Understanding the Flags
--check-integrity=true: This option forces aria2 to check the hash of the existing local files piece by piece against the metadata provided in the torrent file.--dry-run=true: This is the critical flag for this specific use case. It instructs aria2 to simulate the entire download process. It will check the files on your disk and report the results, but it will not write any data to the disk or download missing pieces from peers.
Reading the Output
Once the command finishes running, aria2 will print a summary in the terminal. If the file is complete and uncorrupted, the tool will indicate a successful validation. If pieces are missing or corrupted, the summary will show the total number of valid pieces alongside errors, giving you a clear picture of the file’s integrity without altering a single byte of your existing data.