A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/grubernaut/Golang-Tar below:

grubernaut/Golang-Tar: Proving Golang 1.5.1 does not maintain sparse files on compression

Golang Sparse files and Tar

Proving that Golang, as of Go1.5.1 does not maintain sparse files during file compression with compress/tar.

Steps to reproduce:

During Vagrant Provision, Vagrant will perform the following steps:

# truncate -s 512M sparse.img
# ls -lash sparse.img
0 -rw-r--r-- 1 root root 512M Nov 30 21:29 sparse.img
# tar -C non_sparse/ -xf non_sparse/non_sparse.tar
# tar -C sparse/ -xf sparse/sparse.tar
# ls -lash non_sparse/sparse.img
512M -rw-r--r-- 1 root root 512M Nov 30 21:29 non_sparse/sparse.img
# ls -lash sparse/sparse.img
513M -rw-r--r-- 1 root root 512M Nov 30 21:29 sparse/sparse.img
tar -Scf tar/sparse.tar sparse.img
tar -C tar/ -xf tar/sparse.tar
ls -lash tar/sparse.img
0 -rw-r--r-- 1 root root 512M Nov 30 21:29 tar/sparse.img

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4