1168: "Tar"

This forum is for the individual discussion thread that goes with each new comic.

Moderators: Moderators General, Prelates, Magistrates

Varriount
Posts: 14
Joined: Sun Aug 12, 2012 8:14 am UTC

Re: 1168: Tar

Postby Varriount » Fri Feb 01, 2013 7:28 am UTC

Or just bash the thing to bits with a chainsaw and/or electromagnetic pulse

cisengineer
Posts: 4
Joined: Fri Feb 01, 2013 7:33 am UTC

Re: 1168: Tar

Postby cisengineer » Fri Feb 01, 2013 7:40 am UTC

My standard alias file contains the following:

# tar aliases
alias smoosh='tar czvf'; # much more fun to type
alias unsmoosh='tar xzvf'; # what?
alias lt='tar tzvf'; # list the contents of a tarball.

This does not help me remember the proper flags either.

User avatar
Max™
Posts: 1792
Joined: Thu Jun 21, 2012 4:21 am UTC
Location: mu

Re: 1168: Tar

Postby Max™ » Fri Feb 01, 2013 7:49 am UTC

Varriount wrote:Or just bash the thing to bits with a chainsaw and/or electromagnetic pulse

"Hang on, I'm gonna use this chainsaw on that atomic bomb over there unless you happen to have a smaller atomic bomb handy to EMP it?"

...

Image
mu

Alphonse
Posts: 7
Joined: Fri Feb 01, 2013 5:59 am UTC

Re: 1168: Tar

Postby Alphonse » Fri Feb 01, 2013 7:59 am UTC

RAGBRAIvet wrote:Excuse me.  But one has ten seconds to enter a valid command.  If one does not enter **anything**, said timer remains at 10 seconds, right?

Sometimes the only winning move is to not play.


Umm... I think it's pretty obvious that the time IS counting down.

And hey, the post title is actually completely wrong. Not only should the T not have been capitalised, the quotation marks are missing too.
The correct choice would've been:
1168: "tar"
That's very well explained in the Rules for "Individual XKCD Comic Threads"

DaphneDiane
Posts: 4
Joined: Fri Feb 01, 2013 7:13 am UTC

Re: 1168: Tar

Postby DaphneDiane » Fri Feb 01, 2013 8:00 am UTC

Jamaican Castle wrote:
Varriount wrote:Can't there be some sort of standardization?


At a guess, no.

( guess my account is new enough I can't include the link to 927 that was in the quote above without triggering spam filter.)

There were two competing archive approaches—tar and clio—when they set up the POSIX 1003.1 standard, so of course they created a new one pax and made that standard instead. That's why no one remembers how to use tar anymore. All true UNIX geeks know how much better pax is. Especially since the SUS says it is so. :wink:

Had to write my own implementation of tar a few years back for making bundles for an embedded system. if the command line switches are tricky…. the swath of semi-incompatible extensions that each unix system added to the format are a pain. There is only a 100 characters for the file name and another 155ish characters ( or was it 157? ) for an extension to that and all sorts of ways to combine them or deal with larger names. Because a lot of systems will only split the names at directory level it's possible to have a name that's shorter than the maximum allowed but that still doesn't fit in the header.

mike-l
Posts: 2758
Joined: Tue Sep 04, 2007 2:16 am UTC

Re: 1168: Tar

Postby mike-l » Fri Feb 01, 2013 8:25 am UTC

I admit, I thought 'Oh that's easy', then promptly blew up the world. It's been years since I've used *nix, so I typed in tar -xcf without thinking.
addams wrote:This forum has some very well educated people typing away in loops with Sourmilk. He is a lucky Sourmilk.

Mirkwood
Posts: 70
Joined: Mon Dec 06, 2010 9:10 am UTC

Re: 1168: Tar

Postby Mirkwood » Fri Feb 01, 2013 8:28 am UTC

Max™ wrote:
Varriount wrote:Or just bash the thing to bits with a chainsaw and/or electromagnetic pulse

"Hang on, I'm gonna use this chainsaw on that atomic bomb over there unless you happen to have a smaller atomic bomb handy to EMP it?"

...

Image


Well, the chainsaw approach would probably work. Nuclear weapons are fragile things--you can easily mess up the necessary chain reaction. (You might still cause a deadly local contamination if expose the radioactive material, but you'd save everyone else.)

zerox
Posts: 14
Joined: Wed May 25, 2011 9:35 am UTC

Re: 1168: Tar

Postby zerox » Fri Feb 01, 2013 8:43 am UTC

vector010 wrote:Yeah, my usage of *nix is so minimal right now I'd be dead unless "man tar" counted. :P

The title text does bring up a good point though. I mean, on the PC side we're still mucking around with ZIP and RAR which came out in 1989 and 1993 respectively. That's 20+ year old compression technology we are using. :P


Don't look at me, I use 7-zip. Which also handles zip, rar and tar.whatever.

User avatar
Karkasmolen
Posts: 21
Joined: Mon Mar 12, 2012 5:24 pm UTC
Location: California

Re: 1168: Tar

Postby Karkasmolen » Fri Feb 01, 2013 8:59 am UTC

I FIND THE PREMISE IMPLAUSIBLE RANDALL!!
/

Image

No but really you should know how to disarm it, you're the only one who would design a bomb specifically to detect if someone is using a smart phone in the area to google the answer to a coding question.

philip1201
Posts: 201
Joined: Tue Nov 03, 2009 6:16 am UTC

Re: 1168: Tar

Postby philip1201 » Fri Feb 01, 2013 9:16 am UTC

Mirkwood wrote:
Max™ wrote:
Varriount wrote:Or just bash the thing to bits with a chainsaw and/or electromagnetic pulse

"Hang on, I'm gonna use this chainsaw on that atomic bomb over there unless you happen to have a smaller atomic bomb handy to EMP it?"

...

Image


Well, the chainsaw approach would probably work. Nuclear weapons are fragile things--you can easily mess up the necessary chain reaction. (You might still cause a deadly local contamination if expose the radioactive material, but you'd save everyone else.)


Unless the person who planted the bomb took precautions against dismantling, which seems pretty likely.

User avatar
BAReFOOt
Posts: 179
Joined: Mon Jul 19, 2010 7:48 am UTC

Re: 1168: Tar

Postby BAReFOOt » Fri Feb 01, 2013 9:20 am UTC

What’s so hard about remembering

Code: Select all

tar -xvf something.tar.somecompressionextension
? It auto-detects the compression.
Add some file names if you want only them to be extracted. And add a

Code: Select all

-C $directory
if you want it to end up in a specific directory.
If you want to list them instead, replace the [e]x[tract] by a t[est]. Or use c[compress] to put things into a tar file.

You’re the only one, Randall.

But yeah, we invented the menu (and SCUMM), because “The user doesn’t know what he wants, until he knows what he can get.”. This is true for everything. Even candy stands and elections. Yes, you could just make up what you want… and do a thousand tries, before you get one that exists.

That is why those new interfaces that are search-based, which are now popping up everywhere, are such epic failures. It’s like we’re back at the text adventures again, and are forced to play an infinite game of Family Feud until we snap, and slay its creator with a wet rag and a spoon.

User avatar
Klear
Posts: 1965
Joined: Sun Jun 13, 2010 8:43 am UTC
Location: Prague

Re: 1168: Tar

Postby Klear » Fri Feb 01, 2013 9:21 am UTC

Varriount wrote:On topic, I wonder how the two people in the comic got into such a situation.


Black. Hat. Guy.

And yeah, that also means it's chainsawproof.

User avatar
BAReFOOt
Posts: 179
Joined: Mon Jul 19, 2010 7:48 am UTC

Re: 1168: Tar

Postby BAReFOOt » Fri Feb 01, 2013 9:31 am UTC

Varriount wrote:Don't forget the 5 or so other archive/zip programs, each with their own unique flag combinations.
Can't there be some sort of standardization?
*Prepares for incoming attacks from Linux Pros*


You are aware that tar auto-detects the compression? Even for compression, where it uses the file extension. No need to add any of those flags at all. :)

User avatar
BAReFOOt
Posts: 179
Joined: Mon Jul 19, 2010 7:48 am UTC

Re: 1168: Tar

Postby BAReFOOt » Fri Feb 01, 2013 9:35 am UTC

vector010 wrote: I mean, on the PC side we're still mucking around with ZIP and RAR which came out in 1989 and 1993 respectively.


Oh no, you did not just use “PC” to mean “Windows”?!?!!!
WTF is wrong with you??

Please hand me your computer usage license, take off all your clothes, and stand against the wall.
Now where would you like to be shot with these Clippy-shooting railguns?

User avatar
Klear
Posts: 1965
Joined: Sun Jun 13, 2010 8:43 am UTC
Location: Prague

Re: 1168: Tar

Postby Klear » Fri Feb 01, 2013 9:39 am UTC

BAReFOOt wrote:
vector010 wrote: I mean, on the PC side we're still mucking around with ZIP and RAR which came out in 1989 and 1993 respectively.


Oh no, you did not just use “PC” to mean “Windows”?!?!!!
WTF is wrong with you??

Please hand me your computer usage license, take off all your clothes, and stand against the wall.
Now where would you like to be shot with these Clippy-shooting railguns?


Technically he's right. I mean, I'm guessing you've got rar and zip on Mac etc. as well.

User avatar
BAReFOOt
Posts: 179
Joined: Mon Jul 19, 2010 7:48 am UTC

Re: 1168: Tar

Postby BAReFOOt » Fri Feb 01, 2013 9:42 am UTC

phlip wrote:
rwald wrote:I immediately thought "tar -xvf my_file_name.tar.gz"; I'm not seeing the challenge, here.

Well, if it's .tar.gz then you want to add a -z there, or you're going to blow us all up.


Nope. Not needed. See my comments above about auto-detection.

phlip wrote:Why would I use, say, tar -t when I can just open it up in something like file-roller...


Because file-roller is a cumbersome GUI tool? Because it barely has any functionality at all? Because it can’t be automated? (You know: The whole point of having a computer over an iPad or any other fixed-function appliance.)

Until GUI tools are as modular, featureful and keyboard-controllable as CLI tools, I’ll always prefer the CLI ones for emergence and efficiency.

User avatar
BAReFOOt
Posts: 179
Joined: Mon Jul 19, 2010 7:48 am UTC

Re: 1168: Tar

Postby BAReFOOt » Fri Feb 01, 2013 9:45 am UTC

edenist wrote:

Code: Select all

sudo /etc/init.d bombd stop

Code: Select all

Password: _


(Also, joke’s on you. It’s compiled into the kernel, SELinux is active, and the batteries are the only thing keeping the bomb from exploding right away.)

User avatar
BAReFOOt
Posts: 179
Joined: Mon Jul 19, 2010 7:48 am UTC

Re: 1168: Tar

Postby BAReFOOt » Fri Feb 01, 2013 9:47 am UTC

Klear wrote:Technically he's right. I mean, I'm guessing you've got rar and zip on Mac etc. as well.


But then his statement makes no sense. It only makes sense if it defines Unix as “non-PC”.

User avatar
BAReFOOt
Posts: 179
Joined: Mon Jul 19, 2010 7:48 am UTC

Re: 1168: Tar

Postby BAReFOOt » Fri Feb 01, 2013 9:48 am UTC

phlip wrote:How certain are you that that's GNU tar running on that bomb?


If it isn’t, I don’t want to live anymore, anyway… ;)

User avatar
BAReFOOt
Posts: 179
Joined: Mon Jul 19, 2010 7:48 am UTC

Re: 1168: Tar

Postby BAReFOOt » Fri Feb 01, 2013 9:54 am UTC

Max™ wrote:Does it count if I don't have to google to get to one of the many askbuntu/command line fu/help sites because I can just type ask and it'll come up from my history?


Hmm… why not just look it up on another computer? Or even your phone!
(Assuming you know the OS of the bomb. Otherwise the comic makes no sense.)

eternaleye
Posts: 2
Joined: Fri Feb 01, 2013 9:49 am UTC

Re: 1168: Tar

Postby eternaleye » Fri Feb 01, 2013 9:58 am UTC

I think some readers may be overcomplicating the problem.

For one, it says "A valid tar command" - even if we're pessimistic and assume it needs to execute and not just parse, why in the world would you try to extract a tar file when you don't know whether it exists?

In other news, some versions of tar barf on options passed as '-x' or '-c' instead of 'x' or 'c'.

Finally, in the absence of '-f', tar will reliably output to STDOUT - and still be a valid tar command.

lassehp did a damn good job, and that command line ('tar cf - .') would be very reliable - but you could still save 3 keystrokes, and anyone trollish enough to make such a bomb would surely choose a keyboard layout imported from Outer Elbonia to force hunt-and-peck.

'tar c .'

o11c
Posts: 5
Joined: Tue Jan 29, 2013 7:28 pm UTC

Re: 1168: Tar

Postby o11c » Fri Feb 01, 2013 10:15 am UTC

I've never had any problem, except slightly with t. ar is a bit harder to memorize. Just remember: tar doesn't make *sense* without specifying a subcommand - c(reate), x(tract) and t(ablify) are the only ones you'll likely ever need - v is verbose, and unix is full of pipes so you have to specify f.

Incidentally, there's a bug with tar A, that undoubtedly has been around for decades because nobody uses tar A (until I discovered a purpose for it - merging git-archive generated tarballs for submodules).

User avatar
Red Hal
Magically Delicious
Posts: 1445
Joined: Wed Nov 28, 2007 2:42 pm UTC

Re: 1168: Tar

Postby Red Hal » Fri Feb 01, 2013 10:44 am UTC

Image That bomb is obviously designed to throw any viewers of the screen into a paralysis of indecision. One might almost call it a tar baby .... Mine's the one with a printed guide to tar in the pocket.
Lost Greatest Silent Baby X Y Z. "There is no one who loves pain itself, who seeks after it and wants to have it, simply because it is pain..."

User avatar
thevicente
Posts: 119
Joined: Fri Jan 29, 2010 3:19 pm UTC

Re: 1168: Tar

Postby thevicente » Fri Feb 01, 2013 11:03 am UTC

Me, upon reading the comic: "oh man, this comic's thread is going to be enormous"

Already two pages and it's only 9AM. I wish I had some popcorn now.

Kit.
Posts: 1020
Joined: Thu Jun 16, 2011 5:14 pm UTC

Re: 1168: Tar

Postby Kit. » Fri Feb 01, 2013 11:14 am UTC

rwald wrote:I immediately thought "tar -xvf my_file_name.tar.gz"; I'm not seeing the challenge, here.

Since you needed that -v, consider yourself already screwed.

ijuin
Posts: 799
Joined: Fri Jan 09, 2009 6:02 pm UTC

Re: 1168: Tar

Postby ijuin » Fri Feb 01, 2013 11:28 am UTC

BAReFOOt wrote:
edenist wrote:

Code: Select all

sudo /etc/init.d bombd stop

Code: Select all

Password: _


(Also, joke’s on you. It’s compiled into the kernel, SELinux is active, and the batteries are the only thing keeping the bomb from exploding right away.)

The batteries are keeping it from exploding? I really can't think of any effective method of detonating a nuke that doesn't require electronic control of the detonation sequence, seeing as how sub-millisecond precision is required to avoid a fizzle. Mechanically-actuated "dead man's switches" would not be precise enough.

Ehsanit
Posts: 50
Joined: Tue Nov 09, 2010 7:53 pm UTC

Re: 1168: Tar

Postby Ehsanit » Fri Feb 01, 2013 11:48 am UTC

ijuin wrote:
BAReFOOt wrote:
edenist wrote:

Code: Select all

sudo /etc/init.d bombd stop

Code: Select all

Password: _


(Also, joke’s on you. It’s compiled into the kernel, SELinux is active, and the batteries are the only thing keeping the bomb from exploding right away.)

The batteries are keeping it from exploding? I really can't think of any effective method of detonating a nuke that doesn't require electronic control of the detonation sequence, seeing as how sub-millisecond precision is required to avoid a fizzle. Mechanically-actuated "dead man's switches" would not be precise enough.

Inaccessible reserve batteries inside the case, currently disconnected by a relay.

Varriount
Posts: 14
Joined: Sun Aug 12, 2012 8:14 am UTC

Re: 1168: Tar

Postby Varriount » Fri Feb 01, 2013 12:15 pm UTC

Out of curiosity (and a lack of self preservation), why are we still using tar? As EvanED pointed out, aren't there better better alternatives out there, such as zip? Or is there some special reason that almost the entire Linux community still uses it?

OP Tipping
Posts: 174
Joined: Thu Dec 13, 2007 6:23 am UTC

Re: 1168: Tar

Postby OP Tipping » Fri Feb 01, 2013 12:27 pm UTC

easy

Kit.
Posts: 1020
Joined: Thu Jun 16, 2011 5:14 pm UTC

Re: 1168: Tar

Postby Kit. » Fri Feb 01, 2013 12:32 pm UTC

ijuin wrote:I really can't think of any effective method of detonating a nuke that doesn't require electronic control of the detonation sequence, seeing as how sub-millisecond precision is required to avoid a fizzle.

I can. Make your "fizzles" powerful enough.

Like in Teller-Ulam design.

User avatar
rdnetto
Posts: 9
Joined: Fri Nov 13, 2009 5:54 am UTC

Re: 1168: Tar

Postby rdnetto » Fri Feb 01, 2013 12:33 pm UTC

My three most commonly used tar commands:

Code: Select all

tar axf myarchive.tar.gz
tar atf  myarchive.tar.xz
tar acf  myarchive.tar.bz2 stuff_that_takes_up_too_much_space

Extract, list contents (/test), and create respectively. Use 'a' for automatic format detection, make sure 'f' is the last, and you're done.
This really isn't hard - I've only ever had to rtfm when doing more arcane stuff with it.

Monster_user
Posts: 6
Joined: Mon Nov 29, 2010 2:35 am UTC

Re: 1168: Tar

Postby Monster_user » Fri Feb 01, 2013 12:45 pm UTC

tar -xf *.tar*
Then press tab to get the first tarball in the folder? (Tab autocompletion)

Compression bomb? Given that a "compression bomb" that would extract 500 terabytes in 10 seconds, what should we do?

EvanED
Posts: 4324
Joined: Mon Aug 07, 2006 6:28 am UTC
Location: Madison, WI
Contact:

Re: 1168: Tar

Postby EvanED » Fri Feb 01, 2013 12:59 pm UTC

Varriount wrote:Out of curiosity (and a lack of self preservation), why are we still using tar? As EvanED pointed out, aren't there better better alternatives out there, such as zip? Or is there some special reason that almost the entire Linux community still uses it?

I'd say it's historical reasons mostly. But at the same time, it's definitely not true that zip is superior. Remember how I said one of zip's design goals is to make it possible to extract a single file without decompressing the entire archive? (In particular, I think the data you need to extract some file will be contiguous. E.g. if I have a zip archive that spans five, uh, floppy disks and just ask for one file, it'll only prompt me for disk 3 instead of all 5.)

Well, this actually hampers the compression ratio. Not by much, but just a little bit. When you use something like .tar.bz2, this has two steps. The first is to put all of the files into a single tar; this is essentially just concatenating them all together, back-to-back, with a small amount of metadata like the file name. The second step is to compress that tar file with, in the case of .tar.bz2, bzip2. Because it's only compressing one physical file anyway, bzip2 is better able to take advantage of any redundant information across the original files, even if that means that the information required to extract a single original file is scattered across the entire zip archive.

I tried compressing a semi-random directory using two methods. The first method creates a tar file than compresses it with bzip2. The second method created a zip file, but telling 7-zip to use the bzip2 compression method. (I don't know details, but from what I infer from this choice is that zip is more of a container format than a compression format. Something like how a .avi file can have the video stored using many different codecs.) Both compressions were done using 7-zip's "ultra" compression level. The .tar.bz2 file wound up at 68.0 MB while the .zip file wound up at 71.8 MB, so about 5% larger.

(In the interest of full disclosure: a second test using a directory that basically didn't compress at all wound up with the .zip just a hair smaller. (A couple hundred KB over 83 MB of data.) A third, much smaller test, came in at 3,097KB for .tar.bz2 and 3,540KB for .zip.)

Without passing judgement on whether this is good or bad in this case, the tar-plus-compression method in some sense is an epitome of the Unix philosophy to have several utilities that each do one thing and do it well, and then you can put them together to get power. tar does a pretty good job at combining multiple files into one. bzip2 does a pretty good job at compressing a single file. Why should bzip2 care about putting multiple files together?

hyperpape
Posts: 5
Joined: Wed Jan 11, 2012 12:55 pm UTC

Re: 1168: Tar

Postby hyperpape » Fri Feb 01, 2013 1:10 pm UTC

Varriount wrote:
Psykar wrote:Why do I know this stuff off the top of my head >.<

I don't know, but could you scrape some of it into my head? Reading 50+ line help printouts gives me a migraine.

I wish a pythonic variant of bash would come out, and act like I expect it to.
Well, there's actually two questions here: one is about the design and options of unix utilities (which flags should tar have?) and another is about the shell. As for the latter: I don't think it's possible (and zsh is nice, but it doesn't address this complaint--the general syntax is still bash/ksh-like). I've been thinking about the design of shell languages a lot recently, because it's the only way to motivate myself to properly learn the weird edge cases and get better at scripting.

The thing is that current shells have incredibly concise ways of doing the specific tasks that shells are optimized for: operating on files, piping, input and output redirection, etc. They also face the burden that the way they solve those problems should be as good as possible for interactive use, not just writing scripts. Just being able to "rm *" or "cd .." clashes with tons of design decisions of ordinary programming languages. Globbing, treating unquoted characters as strings, parameter expansion, concise redirection and so on rule out many more.

I think there's room for someone to ditch the design decisions of earlier shells and make something better. But it will always either a) be a weird experience to someone used to non-shell programming languages or b) be more verbose than the current shell, in a way that hurts experienced users the most.

P.S. If you want something that exists now, you might try fish. Edit: on second thought, I'm not sure how much fish helps. It removes one of the most absurd issues, whitespace sensitivity in assignment statements, but in a lot of other ways, it's closer to bash than I'd like. But maybe it's still worth looking at.
Last edited by hyperpape on Fri Feb 01, 2013 2:03 pm UTC, edited 1 time in total.

User avatar
cellocgw
Posts: 1760
Joined: Sat Jun 21, 2008 7:40 pm UTC

Re: 1168: Tar

Postby cellocgw » Fri Feb 01, 2013 1:15 pm UTC

vector010 wrote: I mean, on the PC side we're still mucking around with ZIP and RAR which came out in 1989 and 1993 respectively. That's 20+ year old compression technology we are using. :P


I have an algorithm for a new compression technology that's 50% more efficient, but there isn't room left in this tarball to post it.
(and, yes, seriously, there aren't any generalized compression algorithms which are better than those oldies. It's like complaining that Newton's Method for rootfinding is N-hundred years old)
https://app.box.com/witthoftresume
Former OTTer
Vote cellocgw for President 2020. #ScienceintheWhiteHouse http://cellocgw.wordpress.com
"The Planck length is 3.81779e-33 picas." -- keithl
" Earth weighs almost exactly π milliJupiters" -- what-if #146, note 7

User avatar
TimXCampbell
Posts: 110
Joined: Wed Jul 27, 2011 4:26 am UTC
Location: Very Eastern Kentucky, USA
Contact:

Re: 1168: Tar

Postby TimXCampbell » Fri Feb 01, 2013 1:33 pm UTC

Is this the first xkcd to identify somebody by name?

Rob? Short for Robert? Do we now have a name that's more conventional than that of the anti-hero “Black Hat Guy”?

ycc1988
Posts: 28
Joined: Fri Jun 22, 2012 5:13 am UTC

Re: 1168: Tar

Postby ycc1988 » Fri Feb 01, 2013 1:37 pm UTC

Is -xkcd a valid group of flags for any semi-well-known *n*x command?

Varriount
Posts: 14
Joined: Sun Aug 12, 2012 8:14 am UTC

Re: 1168: Tar

Postby Varriount » Fri Feb 01, 2013 1:42 pm UTC

TimXCampbell wrote:Is this the first xkcd to identify somebody by name?

Rob? Short for Robert? Do we now have a name that's more conventional than that of the anti-hero “Black Hat Guy”?

*GASP*

So, it has come to this
Last edited by Varriount on Fri Feb 01, 2013 2:32 pm UTC, edited 1 time in total.

User avatar
Max™
Posts: 1792
Joined: Thu Jun 21, 2012 4:21 am UTC
Location: mu

Re: 1168: Tar

Postby Max™ » Fri Feb 01, 2013 1:52 pm UTC

BAReFOOt wrote:
Max™ wrote:Does it count if I don't have to google to get to one of the many askbuntu/command line fu/help sites because I can just type ask and it'll come up from my history?


Hmm… why not just look it up on another computer? Or even your phone!
(Assuming you know the OS of the bomb. Otherwise the comic makes no sense.)

That's actually what I meant, I wouldn't try to do a search on a bomb that just told me not to do a search.

Though I suppose I'm odd in that I actually prefer the search oriented interfaces like Unity because I'm so rarely trying to find what program I can use rather than just wanting a particular program, assuming I don't know a terminal method or can't find one quickly.

Varriount wrote:
TimXCampbell wrote:Is this the first xkcd to identify somebody by name?

Rob? Short for Robert? Do we now have a name that's more conventional than that of the anti-hero “Black Hat Guy”?

*GASP*

So, it has come to this

Image
No, it hasn't, quoth the server "four-oh-four".
Last edited by Max™ on Fri Feb 01, 2013 2:09 pm UTC, edited 1 time in total.
mu

User avatar
Klear
Posts: 1965
Joined: Sun Jun 13, 2010 8:43 am UTC
Location: Prague

Re: 1168: Tar

Postby Klear » Fri Feb 01, 2013 2:09 pm UTC

EvanED wrote:
Varriount wrote:Out of curiosity (and a lack of self preservation), why are we still using tar? As EvanED pointed out, aren't there better better alternatives out there, such as zip? Or is there some special reason that almost the entire Linux community still uses it?

I'd say it's historical reasons mostly. But at the same time, it's definitely not true that zip is superior. Remember how I said one of zip's design goals is to make it possible to extract a single file without decompressing the entire archive? (In particular, I think the data you need to extract some file will be contiguous. E.g. if I have a zip archive that spans five, uh, floppy disks and just ask for one file, it'll only prompt me for disk 3 instead of all 5.)

Well, this actually hampers the compression ratio. Not by much, but just a little bit. When you use something like .tar.bz2, this has two steps. The first is to put all of the files into a single tar; this is essentially just concatenating them all together, back-to-back, with a small amount of metadata like the file name. The second step is to compress that tar file with, in the case of .tar.bz2, bzip2. Because it's only compressing one physical file anyway, bzip2 is better able to take advantage of any redundant information across the original files, even if that means that the information required to extract a single original file is scattered across the entire zip archive.

(...)


I think winrar (and quite possibly almost every other modern compression software) has the option of creating "solid archive" which is exactly this.


Return to “Individual XKCD Comic Threads”

Who is online

Users browsing this forum: Soupspoon and 37 guests