Pages : 1
#1 Le 03/06/2020, à 12:52
- Harvey13
TAR end-of-archive entry
Bonjour,
Lorsque j'utilise la commande TAR -uf test.csv, je me retrouve avec 5217 zeros en fin de fichier
Dans la doc j'ai lu que "end-of-archive entry" contient 2 blocs de 512 octets
Pourquoi en ai je 10 fois plus ?
Hors ligne
#2 Le 03/06/2020, à 13:33
- geole
Re : TAR end-of-archive entry
Bonjour
Il faut probablement mettre à jour la documentation en question.
a@a:~$ tar -uf test.csv
a@a:~$ wc test.csv
0 0 10240 test.csv
Les grilles de l'installateur https://doc.ubuntu-fr.org/tutoriel/inst … _subiquity
"gedit admin:///etc/fstab" est proscrit, utilisez "pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY xdg-open /etc/fstab" Voir https://doc.ubuntu-fr.org/gedit
Les partitions EXT4 des disques externes => https://forum.ubuntu-fr.org/viewtopic.p … #p22697248
Hors ligne
#3 Le 03/06/2020, à 14:44
- Harvey13
Re : TAR end-of-archive entry
Mes sources normalement officielles : https://www.gnu.org/software/tar/manual/tar.html
"Each file archived is represented by a header block which describes the file, followed by zero or more blocks which give the contents of the file. At the end of the archive file there are two 512-byte blocks filled with binary zeros as an end-of-file marker. A reasonable system should write such end-of-file marker at the end of an archive, but must not assume that such a block exists when reading an archive. In particular GNU tar always issues a warning if it does not encounter it."
Hors ligne
#4 Le 03/06/2020, à 14:58
- geole
Re : TAR end-of-archive entry
Cette version
GNU tar: an archiver tool
This manual is for GNU tar (version 1.32, 4 February 2019), which creates and extracts files from archives.
Copyright © 1992, 1994-1997, 1999-2001, 2003-2017 Free Software Foundation, Inc.
n'est pas à consulter car
a@a:~$ tar --version
tar (GNU tar) 1.30
Copyright © 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Les grilles de l'installateur https://doc.ubuntu-fr.org/tutoriel/inst … _subiquity
"gedit admin:///etc/fstab" est proscrit, utilisez "pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY xdg-open /etc/fstab" Voir https://doc.ubuntu-fr.org/gedit
Les partitions EXT4 des disques externes => https://forum.ubuntu-fr.org/viewtopic.p … #p22697248
Hors ligne
#5 Le 04/06/2020, à 06:44
- DonutMan75
Re : TAR end-of-archive entry
Hello,
l'origine de ce comportement se trouve dans la doc officielle de tar (pas le man) : cela provient vraisemblablement du Blocking Factor (par défaut fixé à 20).
9.4.2 The Blocking Factor of an Archive
The data in an archive is grouped into blocks, which are 512 bytes. Blocks are read and written in whole number multiples called records. The number of blocks in a record (i.e., the size of a record in units of 512 bytes) is called the blocking factor. The `--blocking-factor=512-size' (`-b 512-size') option specifies the blocking factor of an archive. The default blocking factor is typically 20 (i.e., 10240 bytes), but can be specified at installation. To find out the blocking factor of an existing archive, use `tar --list --file=archive-name'. This may not work on some devices.
Hors ligne