Was trying to extract a totally legit copy of Skate 3 I downloaded today to play on my Steam Deck

You are viewing a single thread.
View all comments
16 points

tar -xvf or we all kill

permalink
report
reply
9 points

shouldnt there be a filename argument ?

permalink
report
parent
reply
5 points

Yes. However, if you had skipped the -f, it would have been valid. Without the filename argument, it assumes it should extract from the tape drive (TAR = Tape ARchive). The tape device is probably something like /dev/rmt0, but you don’t need to specify that. Using the -f is technically an exception which means “instead of extracting from the tape like you’d normally do, pretend that this file is the tape device instead.”

permalink
report
parent
reply
3 points
*

GNU tar, at least a modern one, that is the one that happens to come with my system, won’t try to read from /dev but stdin and then complain that it’s a terminal and refuse.

Quoth POSIX on the f flag:

Use the first file operand […] as the name of the archive instead of the system-dependent default.

That is GNU is compliant, here, the default is system-dependent. f - is required to be stdin, though, so you can bunzip2 foo.tar.bz2 | tar xf - or such in a portable manner, don’t have to rely on tar having a z option (which is nonstandard) or it auto-detecting compression (even more nonstandard). What is not standard either is tar -x: Tar doesn’t take leading hyphens. Tar is one of those programs so old its command line syntax got standardised before command line syntax standards were established. OTOH it’s not nearly as bad as dd, you can interpret how tar does things in the same way as git pull: It’s a subcommand, not a flag.

permalink
report
parent
reply
2 points

I definitely still killed us all, but at the same time how are you supposed to know any of the filenames if none are given from the comic? I guess my real answer is to ‘tar -xvf’ then hit tab with hopes of decent file completion functionality lol

permalink
report
parent
reply
1 point

tar -czf $(ls | head -n1) if we dont trust globs

or run find in /bin or something

permalink
report
parent
reply
6 points

ya blew it kid

permalink
report
parent
reply

linuxmemes

!linuxmemes@lemmy.world

Create post

Hint: :q!


Sister communities:

Community rules (click to expand)

1. Follow the site-wide rules
2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack members of the community for any reason.
  • Leave remarks of “peasantry” to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
  • These rules are somewhat loosened when the subject is a public figure. Still, do not attack their person or incite harrassment.
3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn. Even if you watch it on a Linux machine.
4. No recent reposts
  • Everybody uses Arch btw, can’t quit Vim, and wants to interject for a moment. You can stop now.

Please report posts and comments that break these rules!

Community stats

  • 6.8K

    Monthly active users

  • 1.3K

    Posts

  • 71K

    Comments