LinuxCommandLibrary

transmission-edit

Modify Transmission torrent properties

TLDR

Add a URL to a torrent's announce list

$ transmission-edit [[-a|--add]] [http://example.com] [path/to/file.torrent]
copy

Remove a URL from a torrent's announce list
$ transmission-edit [[-d|--delete]] [http://example.com] [path/to/file.torrent]
copy

Update a tracker's passcode in a torrent file
$ transmission-edit [[-r|--replace]] [old-passcode] [new-passcode] [path/to/file.torrent]
copy

SYNOPSIS

transmission-edit [OPTIONS] <torrent-file(s)>

PARAMETERS

-a, --add <file-or-folder>
    Adds a new file or folder to the torrent's file list. The path must be relative to the torrent's root directory.

-d, --delete <file-or-folder>
    Deletes an existing file or folder from the torrent's file list. The path must match an existing entry.

-o, --out <file>
    Saves the edited torrent to the specified file. If this option is omitted, the original torrent file is directly overwritten.

-p, --private
    Marks the torrent as private. Private torrents typically disable DHT (Distributed Hash Table) and PEX (Peer Exchange) to ensure all peer discovery goes through the tracker.

-P, --public
    Marks the torrent as public, allowing features like DHT and PEX for peer discovery, which are useful for trackerless torrents or when a tracker is down.

-t, --tracker <url>
    Adds a new tracker URL to the torrent's announcement list. This option can be specified multiple times to add several trackers.

-T, --delete-tracker <url>
    Deletes the specified tracker URL from the torrent's announcement list. This option can be used multiple times to remove various trackers.

-r, --replace-tracker <oldurl> <newurl>
    Replaces an old tracker URL with a new tracker URL in the torrent's announcement list. This option can be used multiple times for different replacements.

-v, --version
    Displays the version number of transmission-edit and exits.

-h, --help
    Shows a usage guide for the command, including available options and examples, then exits.

DESCRIPTION

The transmission-edit command-line utility allows users to modify the metadata within .torrent files. It provides functionalities to add or remove files and folders from a torrent's content list, manage tracker URLs by adding, deleting, or replacing them, and toggle the torrent's private or public status. This tool directly edits the specified .torrent file, or creates a new one if an output file is specified, making it useful for correcting or updating torrent information without needing to recreate the torrent from scratch.

CAVEATS

When using transmission-edit without the --out option, the original .torrent file is directly overwritten. It is highly recommended to back up your torrent files before editing them to prevent accidental data loss. Modifying the file list (adding or deleting files/folders) in a torrent can change its info hash, which might necessitate that the BitTorrent client re-checks or re-hashes the torrent data.

USAGE EXAMPLES

To modify a torrent, simply provide the path to the .torrent file(s) as argument(s).

To add a new tracker to 'my_movie.torrent':
transmission-edit -t "http://newtracker.com/announce" my_movie.torrent

To make 'my_album.torrent' private and save the changes to a new file named 'private_album.torrent':
transmission-edit -p -o private_album.torrent my_album.torrent

To replace an old tracker with a new one in 'my_archive.torrent':
transmission-edit -r "http://old.tracker.org" "http://new.tracker.org" my_archive.torrent

HISTORY

transmission-edit is an integral part of the Transmission BitTorrent client suite, a project known for its lightweight, fast, and feature-rich design. While its specific development timeline isn't extensively documented as a standalone utility, it has evolved alongside the main Transmission client. Its functionality reflects the common need for users to adjust or correct metadata in existing .torrent files, rather than requiring a full re-creation, making it a valuable tool for torrent management tasks.

SEE ALSO

Copied to clipboard