tar commands

3 commands, each with a one-line explanation. Click a command to copy it, or its title for details.

Commands 3 shown

  • tar -czg snapshot.snar -f backup-$(date +%F).tgz /data

    Level-based incremental backups: snapshot.snar tracks state so only changed files are archived

    disk · performance

  • tar c -C /src . | ssh user@<host> 'tar x -C /dst'

    Copy a tree without intermediate file, preserving perms; add zstd in pipe for slow links

    network · troubleshooting

  • tar cf - /data | pv -s $(du -sb /data | awk '{print $1}') | zstd -T0 > data.tar.zst

    Show bytes/ETA via pv while streaming into zstd; du -sb supplies total size for the bar

    monitoring · performance