So, I wanted to mess around with creating “tar bricks”. I heard it’s a way to kinda archive a bunch of files, but make them super hard to recover. Sounds fun, right?
First, I grabbed a bunch of random files. Nothing important, just some old text documents, a few images, you know, the usual digital junk. Then I used the `tar` command to pack them up. Something like, `tar -cf * `. This gave me my first tar archive, a neat little package of all those files. Not so brick-like yet, though.
Next, I got greedy. I made a bunch of copies of that first tar file. Let’s say ten for good measure. I ended up with `*`, `*`, all the way to `*`. All identical, all filled with the same junk.
Now for the fun part. I started nesting these tar files within each other. I took `*` and used `tar` again to stuff it into a new archive, let’s call it `*`. I did this over and over, each time adding another tar file to the mix. Imagine a Russian nesting doll, but with digital files, and way less charming.
- `tar -cf * *`
- `tar -cf * * *`
- …and so on until I had all ten `mybrick` files packed in, each nested deeper than the last.
The final `*` was a monster. A digital beast filled with layers upon layers of archives. This, my friends, is what I’d call a “tar brick”.
To really test it out, I tried extracting it. I used `tar -xf *` and waited. And waited. And waited some more. My poor computer was chugging along, trying to unpack this mess. It felt like it was taking forever, and the extracted files just kept piling up! That’s how you know it’s working, haha.
In the end, I did get all the original files back, but it took a ridiculously long time. Mission accomplished, I guess? It was a fun little experiment to see how messy you could get with `tar`. I wouldn’t recommend doing this with anything important, though. Unless you really, really hate someone and want to give them a digital headache.