3 ms·
I wonder why nobody uses -C and --strip options of tar. It handles those stuff automatically. mkdir -p application tar --strip=1 -C application -xf arc
by pvtmert 6y ago
I wonder why nobody uses -C and --strip options of tar. It handles those stuff automatically.
mkdir -p application
tar --strip=1 -C application -xf archive.tar
For example installing NodeJS from archive when composed with curl:
OS=$(uname -s)-x64
VER=12.16.1
curl -#L "https://nodejs.org/dist/v${VER}/node-v${VER}-${OS,,}.tar.gz" \
| sudo tar --strip=1 -xzC /usr/local
IMHO thats probably the reason why most apps are having proprietary installers :)