A simple, verbose URL unshortener.
unshorten [OPTIONS] URL
-max-redirects
: Maximum number of redirects to follow. (default 10)-quiet
: Run quietly; only display the final URL.-version
: Print version and exit.
brew install cdzombak/oss/unshorten
Install my Debian repository if you haven't already:
sudo apt-get install ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://dist.cdzombak.net/deb.key | sudo gpg --dearmor -o /etc/apt/keyrings/dist-cdzombak-net.gpg
sudo chmod 0644 /etc/apt/keyrings/dist-cdzombak-net.gpg
echo -e "deb [signed-by=/etc/apt/keyrings/dist-cdzombak-net.gpg] https://dist.cdzombak.net/deb/oss any oss\n" | sudo tee -a /etc/apt/sources.list.d/dist-cdzombak-net.list > /dev/null
sudo apt-get update
Then install unshorten
via apt-get
:
sudo apt-get install unshorten
Pre-built binaries for Linux and macOS on various architectures are downloadable from each GitHub Release. Debian packages for each release are available as well.
git clone https://github.com/cdzombak/unshorten.git
cd unshorten
make build
cp out/unshorten $INSTALL_DIR
Docker images are available for a variety of Linux architectures from Docker Hub and GHCR. Images are based on the scratch
image and are as small as possible.
Run them via, for example:
docker run --rm cdzombak/unshorten:1 https://dzdz.cz
docker run --rm ghcr.io/cdzombak/unshorten:1 https://dzdz.cz
- Issues: github.com/cdzombak/unshorten/issues
- Author: Chris Dzombak
MIT; see LICENSE
in this repository.