I got bored and reverse engineered how SCO #cpio is able to store such large files in their archives when the newc format only officially supports 4GiB file entries.

I am not a coder, so I just made some files with cpio from the Heirloom Toolset and looked at them in hexdump.

#rpm packages use #newc for payload and have the same 4 GiB individual limit. Maybe they should adopt this extension. The they can have up to 9 EiB entries, which should be good enough. 🤪

https://gist.github.com/ruario/b02c762c95d6521d5df4f798cd795318

SCO file size extension

SCO file size extension. GitHub Gist: instantly share code, notes, and snippets.

Gist

Ever wondered about the inode trunctation in #cpio formats and what that might mean for the integrity of your archives on modern systems?

No? No, I didn't think so because that is nerdy as fuck!!! 🤓

Nonetheless, I typed this up. No need to… umm… thank me. 🤪

https://gist.github.com/ruario/b09334336f202bef0c3e1b1c6f5b1451

GNU cpio and inode truncation considerations

GNU cpio and inode truncation considerations. GitHub Gist: instantly share code, notes, and snippets.

Gist

Since 1993, I have favored #cpio archives for my personal data over #tar. When I used #Unix SYSVR3.2.3 on an AT&T 3B2/600, tar was buggy, and didn't preserve as much file details as cpio.

I was archiving up some old backup incrementals for posterity, and decided to just change to tar. It's gotta be the case that these 33 years later, & a dozen reimplementations of both tar & cpio, that tar is the better choice, no?

(I am using the #GNU versions of tar & cpio now, of course).

#Linux

cpio – Dateien aus Archiven und in Archive kopieren

Du kennst tar vielleicht schon als Standardwerkzeug für Backups und Archivierungen unter Linux, doch cpio bietet dir eine flexible Alternative, die besonders in Skripten, Initramfs-Generierung oder bei der LPIC- und RHCSA-Zertifizierung nützlich ist. Als Sysadmin nutzt du cpio, um Dateien effizient in und aus Archiven zu kopieren, ohne auf grafische Tools angewiesen zu sein, und es integriert sich nahtlos mit Befehlen wie find oder ls. Grundlagen von cpio cpio steht für "copy in, copy […]

https://andreas-moor.de/cpio-dateien-aus-archiven-und-in-archive-kopieren/

Ещё одна заметка про tar

Ко мне как-то обратился коллега с вопросом: «А ты запомнил команду для подготовки архива .tar.gz ?» И я такой на автомате: « tar zcf имя.tar.gz ... » А он мне в ответ: «Нет, ты не понял. Ты эту команду запомнил? Мне приходится «гуглить» каждый раз, когда требуется сделать архив.» Ах, вот в чём дело. Действительно, команду я запомнил и уже давольно давно. Если уважаемый читать хочет узнать немного больше, то предлагаю продолжить чтение. Но хочу предупредить, что ничего ранее неизвестного и сокровенного в заметке про tar не стоит ждать (почти). Всё ещё хочется узнать подробности? Давайте читать дальше.

https://habr.com/ru/articles/897872/

#tar #cpio #pax #архиваторы

Ещё одна заметка про tar

Ко мне как-то обратился коллега с вопросом: «А ты запомнил команду для подготовки архива .tar.gz ?» И я такой на автомате: « tar zcf имя.tar.gz ... » А он мне в ответ: «Нет, ты не понял. Ты эту...

Хабр

I really did underestimate #xz as compression for a #cpio #initramdisk:

I was able to just shove the pre-made, full & uncut #toybox binary from @landley and still have some breathing room.

Tho I expect this to change once I put a #linux #kernel in that has actual #networking capabilities...

This will be interesting for OS/1337.

http://landley.net/toybox/bin/
https://landley.net/toybox/help.html

#OS1337 #LinuxDevelopment #EmbeddedLinux #Development

Index of /toybox/bin

a macOS .pkg file – an xar archive file
https://en.wikipedia.org/wiki/.pkg

https://en.wikipedia.org/wiki/xar_(archiver) – using xar is pretty similar to tar

https://linux.die.net/man/1/xar

Inside the .pkg, you will find a file by the name *.pkg/Payload. That's in fact a gzipped cpio file, so this will show you its content:

$ gzip -cd *.pkg/Payload | cpio -itv
https://wp.jochen.hayek.name/blog-en/2023/04/20/macos-pkg-file/
#cpio #gzip #tar #xar

.pkg - Wikipedia

“Swap the bytes of each halfword in the files”

WTF!?

#Cpio

#cpio #difference #tar
【質問】tar と cpio の違いは何ですか。
http://tooljp.com/linux/faq/010DCDF29B95D152492579B7003DD886.html

2014-10-06にブックマーク

tar と cpio の違いは何ですか。 | Redhat Enterprise Linux 4

Red Hat Linux EL 6 FAQ :tar と cpio の違いは何ですか。

Copy Specific File Types While Keeping Directory Structure In Linux

This brief tutorial explains how to copy specific file types while keeping the directory structure in Linux.

OSTechNix