Seamlessly convert between Linux and Windows UNC paths. Convert local Linux path to Windows/Linux UNC and vice versa.
Convert between Linux and Windows UNC:
unctool convert 'smb://mynas.local/some/path' -t windows
# \\mynas.local\some\path
unctool convert '\\mynas.local\some\path' -t linux
# smb://mynas.local/some/pathConvert to remote UNC:
unctool remote-path /mnt/mynas.local/some/path -t windows
# \\mynas.local\some\path
unctool remote-path /mnt/mynas.local/some/path -t linux
# smb://mynas.local/some/pathConvert from remote UNC:
unctool local-path '\\mynas.local\some\path'
# /mnt/mynas.local/some/path
unctool local-path 'smb://mynas.local/some/path'
# /mnt/mynas.local/some/pathUNC Tool reads /proc/mounts, filters CIFS mounts, and performs local/remote path substitutions. Conversion between Windows and Linux UNC paths handles OS separator replacement.
curl -sL -o unctool https://github.com/poul1x/unctool/releases/latest/download/unctool-x86_64
chmod +x unctool
sudo mv unctool /usr/local/bin
# Test run
unctool --helpcurl -sL -o unctool https://github.com/poul1x/unctool/releases/latest/download/unctool-i686
chmod +x unctool
sudo mv unctool /usr/local/bin
# Test run
unctool --helpgit clone https://github.com/poul1x/unctool.git
cd unctool
rustup target add x86_64-unknown-linux-musl
cargo build --release --target x86_64-unknown-linux-musl
cp ./target/x86_64-unknown-linux-musl/release/unctool-cli unctool-cli
strip --strip-all ./unctool-cli
# Test run
./unctool-cli --helpgit clone https://github.com/poul1x/unctool.git
cd unctool
rustup target add i686-unknown-linux-musl
cargo build --release --target i686-unknown-linux-musl
cp ./target/i686-unknown-linux-musl/release/unctool-cli unctool-cli
strip --strip-all ./unctool-cli
# Test run
./unctool-cli --help