Editing Talk:1168: tar

Jump to: navigation, search
Ambox notice.png Please sign your posts with ~~~~

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
 
I thought the title text would be "tar --help"
 
I thought the title text would be "tar --help"
 
[[Special:Contributions/123.202.19.132|123.202.19.132]] 06:59, 1 February 2013 (UTC)
 
[[Special:Contributions/123.202.19.132|123.202.19.132]] 06:59, 1 February 2013 (UTC)
 
Is it good that I could have disarmed the bomb, and I have only used tar (or for that matter, Linux) sparsely? [[User:NSDCars5|NSDCars5]] ([[User talk:NSDCars5|talk]]) 12:16, 9 May 2014 (UTC)NSDCars5
 
  
 
The comic is about the difficulty of the tar program options.
 
The comic is about the difficulty of the tar program options.
Line 35: Line 33:
 
tar -bvzx for a tar.bzip2 .... wait... no... argh... I've always just trusted my fingers.. --[[Special:Contributions/59.167.191.93|59.167.191.93]] 10:14, 1 February 2013 (UTC)
 
tar -bvzx for a tar.bzip2 .... wait... no... argh... I've always just trusted my fingers.. --[[Special:Contributions/59.167.191.93|59.167.191.93]] 10:14, 1 February 2013 (UTC)
 
: Will '''tar -?''' be valid everywhere?. [[User:Arifsaha|Arifsaha]] ([[User talk:Arifsaha|talk]]) 19:32, 1 February 2013 (UTC)
 
: Will '''tar -?''' be valid everywhere?. [[User:Arifsaha|Arifsaha]] ([[User talk:Arifsaha|talk]]) 19:32, 1 February 2013 (UTC)
:: No, in very old implementations of tar (pre-POSIX), the hyphen is not permitted before flags. I believe that '''tar ?''' will be though. [[Special:Contributions/172.68.54.166|172.68.54.166]] 19:55, 14 April 2020 (UTC)
 
::: It's worse than that, neither of those are safe. '''tar ?''' is particularly bad, because if you have a single-character filename in your directory, like '''c''', then this will be the equivalent of '''tar c''' after shell expansion, i.e. to create a file. It's a lot less like that you'll have a file named '''-c''' (and you'd probably have to refer to it as '''./-c''' most of the time), but the problem remains. So instead, at the shell command-line, you must quote the question-mark, i.e. '''tar -\?''' or '''tar \?'''. Still, I think it could be fairly argued that anything that causes tar to print the usage text would not qualify as a "valid" command for purposes of the bomb. [[User:JohnHawkinson|JohnHawkinson]] ([[User talk:JohnHawkinson|talk]]) 19:29, 7 April 2022 (UTC)
 
  
 
tar -lvvb archive.tar.bz
 
tar -lvvb archive.tar.bz
Line 55: Line 51:
  
 
:Yeah, all standard Unix installations should have man installed.  But many mini installations don't, so these days Google is the standard backup.[[User:CityZen|CityZen]] ([[User talk:CityZen|talk]]) 14:58, 1 February 2013 (UTC)
 
:Yeah, all standard Unix installations should have man installed.  But many mini installations don't, so these days Google is the standard backup.[[User:CityZen|CityZen]] ([[User talk:CityZen|talk]]) 14:58, 1 February 2013 (UTC)
: Fixed comment/wasn't reading. Only thing I can say here is that I've used embedded distros without 'man'; you could probably 'strings' the binary though. [[User:Elvenivle|Elvenivle]] ([[User talk:Elvenivle|talk]])
 
  
 
Randall's joke is spot on, as usual. I've been using UNIX for nearly 30 years. Windows User's solution is elegant. Before Google there was the <code>man</code> command. In all seriousness, productivity on a UNIX box can be greatly enhanced simply by keeping good notes. I keep patterns of all sorts of UNIX commands handy so I don't have to look them up. As Wikipedia implies, <code>tar -tf</code> (I prefer <code>-t<b>v</b>f</code>) should be memorized because one quickly learns that one should ''always'' inspect tarballs before unpacking them. ''– [[User:Tbc|tbc]] ([[User talk:Tbc|talk]]) 14:11, 1 February 2013 (UTC)''
 
Randall's joke is spot on, as usual. I've been using UNIX for nearly 30 years. Windows User's solution is elegant. Before Google there was the <code>man</code> command. In all seriousness, productivity on a UNIX box can be greatly enhanced simply by keeping good notes. I keep patterns of all sorts of UNIX commands handy so I don't have to look them up. As Wikipedia implies, <code>tar -tf</code> (I prefer <code>-t<b>v</b>f</code>) should be memorized because one quickly learns that one should ''always'' inspect tarballs before unpacking them. ''– [[User:Tbc|tbc]] ([[User talk:Tbc|talk]]) 14:11, 1 February 2013 (UTC)''
Line 76: Line 71:
  
 
Does this mean we should start retroactively rename cueball to "rob"?
 
Does this mean we should start retroactively rename cueball to "rob"?
:Rob is ''a'' Cueball, not ''every'' Cueball, so no. [[User:JET73L|JET73L]] ([[User talk:JET73L|talk]]) 14:05, 8 February 2013 (UTC)
 
::By that logic, Megan is ''a'' Cutie, not ''every'' Cutie.  We should only name Megan in comics where her name appears. [[User:Djbrasier|Djbrasier]] ([[User talk:Djbrasier|talk]]) 17:07, 12 March 2015 (UTC)
 
  
 
There is something morbid in the subtext here.... I have a feeling that Randall is going to kill off Megan, Rob, and "White Hat"... [[User:Greyson|Greyson]] ([[User talk:Greyson|talk]]) 01:47, 4 February 2013 (UTC)
 
There is something morbid in the subtext here.... I have a feeling that Randall is going to kill off Megan, Rob, and "White Hat"... [[User:Greyson|Greyson]] ([[User talk:Greyson|talk]]) 01:47, 4 February 2013 (UTC)
  
 
Randall, I am disappoint! I haven't used tar for more than a year and I don't err anymore: tar -xvzf file (.gz) or tar -xvjf file (.bz2), and I still consider myself quite the newb. Works on all flavors of linux I tried (I like trying linuxes on VMs, dunno about other unixes, but everytime I need it, I get it right, so I wouldn't even consider this in my list of hardest programs to get right first time). For those interested: -x extract -v verbose (I like it) -z uncompress (for some compression types, in some flavors this works with bz2, IIRC) -j uncompress (for bz2, maybe others). [[Special:Contributions/189.123.132.123|189.123.132.123]] 20:51, 4 February 2013 (UTC)
 
Randall, I am disappoint! I haven't used tar for more than a year and I don't err anymore: tar -xvzf file (.gz) or tar -xvjf file (.bz2), and I still consider myself quite the newb. Works on all flavors of linux I tried (I like trying linuxes on VMs, dunno about other unixes, but everytime I need it, I get it right, so I wouldn't even consider this in my list of hardest programs to get right first time). For those interested: -x extract -v verbose (I like it) -z uncompress (for some compression types, in some flavors this works with bz2, IIRC) -j uncompress (for bz2, maybe others). [[Special:Contributions/189.123.132.123|189.123.132.123]] 20:51, 4 February 2013 (UTC)
 
:Your "z" Is wrong for .bz2 (or .z or uncompressed); it's only for ".gz". The reason it works for you is that your distro is using BSD tar, which silently ignores compression-related flags on the t and x commands and figures it out automatically. Which means you're better off using "-xvf" than "-
 
 
:More importantly, "works on all flavors of linux I've tried" is a far cry from "portable". The majority of desktop Unix systems are not linux, but OS X. There are plenty of servers running other BSD flavors. And lots of old machines running commercial *nixes or OpenSolaris. Not to mention Cygwin, and native/MinGW ports to Windows. People checking in code because "it works on Fedora and Ubuntu, so it must be portable" is becoming as big a problem as when people used to test on three different BSD derivatives but no SysV. So you should feel bad. :P [[Special:Contributions/199.27.130.180|199.27.130.180]] 01:54, 19 September 2015 (UTC)
 
  
 
:Originally bzip used -y. Not speaking about fact that bzip is pretty new - and some unixes don't have ANY compression support in their tar. -- [[User:Hkmaly|Hkmaly]] ([[User talk:Hkmaly|talk]]) 00:03, 7 February 2013 (UTC)
 
:Originally bzip used -y. Not speaking about fact that bzip is pretty new - and some unixes don't have ANY compression support in their tar. -- [[User:Hkmaly|Hkmaly]] ([[User talk:Hkmaly|talk]]) 00:03, 7 February 2013 (UTC)
 
The quickest tar command with valid syntax would be "tar t". Every switch after the first command letter is optional. Even the initial dash is optional. [[Special:Contributions/85.24.234.35|85.24.234.35]] 11:03, 19 February 2013 (UTC)
 
:(That would also be a command that is valid in every known tar version throughout the universe.)
 
: Doesn't appear to work; console redirection is used as the input stream, terminated by Ctrl-D, at which point (on Android, and assuming you don't know the format) tar returns with "invalid tar magic" and then $? is non-zero (fail). If however you redirect 2>/dev/null, then $? returns 0 (success). I think the redirection is what's succeeding so any valid prestidigitation ought to work. [[User:Elvenivle|Elvenivle]] ([[User talk:Elvenivle|talk]])
 
 
The tar command actually has a unique syntax in unix.  Classicly, it's first parameter is a subcommand (letter) followed by zero or more option letters.  (And I think the subcommand had to be first.)  Parameters for the options follow in sequence after that, in the same order the options where listed.  Then, for the 'c' subcommand, an input filename list follows.  This syntax was rather painful when you had perhaps 5 different option letters each with parameters, but this was a normal enough occurance when you specified the tape drive, tape block size, tape length, and a few others I can't even remember.  Early implementations would have a file listing tape configurations so you could pick one and all its parameters with a single digit.  In any case, it should be noted that a dash ('-') was actually NOT ALLOWED on the parameters.  More recent versions of tar have attempted to add the more common unix option parsing, but still support the dash-less form.  Having said all that, I tend to prefer "tar xvzf filename.tar.gz" and "tar tvzf filename.tar.gz".  [[User:Divad27182|Divad27182]] ([[User talk:Divad27182|talk]]) 20:18, 23 February 2013 (UTC)
 
 
I'm not sure about it, so I'll not add to the explanation: doesn't "tarbomb" also refers to a malicious tarball that releases a ridiculously big file filled with blank/random data? [[Special:Contributions/108.162.212.18|108.162.212.18]] 01:26, 17 February 2014 (UTC)
 
 
Um... the prompt is "~# "... That's a root prompt. Shouldn't Rob just "~# kill -9 1
 
 
Kernel panic – not syncing: Attempted to kill init!"? [[Special:Contributions/173.245.56.105|173.245.56.105]] 03:50, 14 July 2015 (UTC)
 
 
The user is root (indicated by the ~#). So, rm -rf / [[Special:Contributions/162.158.45.48|162.158.45.48]] 17:13, 29 November 2015 (UTC)
 
: Linux/OSX will limp along. Root's also probably preserved and the necessary reboot begs the question if you'd be better off rebooting (with power down) in the first place. Assuming it finishes in seconds (OSX is 12 minutes, about), that multiple commands were allowed, or that 'tar' doesn't have to appear first, I'd assume the verifier could be in ROM. [[User:Elvenivle|Elvenivle]] ([[User talk:Elvenivle|talk]])
 
 
I think the fact that there's a page and a half of comments arguing about what would be an 'obvious' solution shows how difficult a question this is... --[[Special:Contributions/108.162.237.226|108.162.237.226]] 08:44, 24 January 2017 (UTC)
 
 
It would be cool if someone made this (without the bomb) in real life. [[Special:Contributions/172.68.133.30|172.68.133.30]] 02:57, 30 July 2017 (UTC)
 
 
I laughed so hard at this comic I woke up the whole house! [[User:The Cat Lady|-- The Cat Lady]] ([[User talk:The Cat Lady|talk]]) 23:18, 22 September 2021 (UTC)
 
 
`tar -xf *.tar` --[[Special:Contributions/172.70.127.44|172.70.127.44]] 13:42, 31 January 2024 (UTC)
 

Please note that all contributions to explain xkcd may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see explain xkcd:Copyrights for details). Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel | Editing help (opens in new window)