Skip to content

Instantly share code, notes, and snippets.

View maxrohleder's full-sized avatar
🏠
Working from home

Maximilian Rohleder maxrohleder

🏠
Working from home
View GitHub Profile
@awesomebytes
awesomebytes / extract_file_remote_machine.md
Last active July 17, 2023 20:45
Extract/Create compressed .tar.gz file directly on remote machine

Extract .tar.gz directly on remote machine

cat BIG_FILE.tar.gz | ssh user@192.168.1.12 "tar xzf - -C /home/user"

This magic command uses the network to only transfer the file and as it reaches the target computer it starts getting decompressed straightaway. Minimum traffic, no temporal disk usage.

Create .tar.gz directly on remote machine