I wonder what happens if I run tar -cf idk.tar /dev/null

Β· Β· Tusky Β· 2 Β· 6 Β· 5

@twann You probably get an archive with a single zero-byte file in it.

@twann the easiest way is probably too try it out 😁

$ tar -cf idk.tar /dev/null
tar: Removing leading '/' from member names
$ wc -c idk.tar
10240 idk.tar

when looking inside it with 7zip, it contains a folder "dev" which contains a file "null" of size 0 bytes and permissions "crw-rw-rw-"

I only knew about '-' and 'd' at the beginning of the file permissions. After seeing 'c' here I learned something new today.
@Johann150 @twann

@alexbuzzbee @twann @Johann150 since you guys are done with /dev/null, time to try with /dev/urandom πŸ˜‚

@menelkir @twann @Johann150 Files that read forever are not a great idea for this... 😬

@menelkir @alexbuzzbee @Johann150 it does the exact same thing except the file in the archive is called "urandom" and not "null"

Sign in to participate in the conversation

Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.