Beehaw
  • Communities
  • Create Post
  • search
    Search
  • Login
  • Sign Up
 sebastiancarlos   ( @sebastiancarlos@lemmy.sdf.org )  to Linux@lemmy.mlEnglish · 2 years ago

How to write a 'tar' command

lemmy.sdf.org

message-square
108
link
fedilink
547

How to write a 'tar' command

lemmy.sdf.org

 sebastiancarlos   ( @sebastiancarlos@lemmy.sdf.org )  to Linux@lemmy.mlEnglish · 2 years ago
message-square
108
link
fedilink
  •  bullshitter   ( @bullshitter@lemm.ee ) 
    link
    fedilink
    arrow-up
    2
    ·
    2 years ago

    Does every Linux command have options as words instead of single letters?

    •  MonkderZweite   ( @MonkderZweite@feddit.ch ) 
      link
      fedilink
      arrow-up
      6
      ·
      2 years ago

      Tar is as old as IT, that’s why it’s syntax is a bit special.

      •  barsoap   ( @barsoap@lemm.ee ) 
        link
        fedilink
        arrow-up
        4
        ·
        2 years ago

        tar -xf is not really special combining short options isn’t uncommon.

        Where tar is nonstandard is that you can leave out the -, tar xf is actually how POSIX specifies it. And we’ve kinda come full circle on that one with many modern utilities using a command syntax, you can read tar xf as “tar extract file” just as you can read git pull as, well, “git pull”.

        If you want to see a standard command with truly non-standard syntax have a look at dd.

        •  MonkderZweite   ( @MonkderZweite@feddit.ch ) 
          link
          fedilink
          arrow-up
          1
          ·
          2 years ago

          Nono, dash-parameters are new in fancy GNU tar. And POSIX is not old.

    •  sonnenzeit   ( @sonnenzeit@feddit.de ) 
      link
      fedilink
      arrow-up
      3
      ·
      2 years ago

      Many do as it’s considered good practice, but it’s not guaranteed, it just depends on the individual command (program). Usually you can use the --help option to see all the options, so for instance tar --help.

    •  Zangoose   ( @Zangoose@lemmy.one ) 
      link
      fedilink
      arrow-up
      2
      ·
      2 years ago

      Most commands will have expanded arguments started with 2 dashes that usually look like ‘–verbose-name-of-option’, they’re usually listed in the man page/documentation along with the abbreviated letter version

Linux@lemmy.ml

linux@lemmy.ml

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !linux@lemmy.ml

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

  • !opensource@lemmy.ml
  • !libre_culture@lemmy.ml
  • !technology@lemmy.ml
  • !libre_hardware@lemmy.ml

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 375 users / day
  • 1.02K users / week
  • 2.42K users / month
  • 7.13K users / 6 months
  • 1.3K local subscribers
  • 60.5K subscribers
  • 7.32K Posts
  • 97.2K Comments
  • Modlog
  • mods:
  •  AgreeableLandscape   ( @AgreeableLandscape@lemmy.ml ) 
  •  nooter692   ( @nooter692@lemmy.ml ) 
  •  MarcellusDrum   ( @MarcellusDrum@lemmy.ml ) 
  •  Arthur Besse   ( @cypherpunks@lemmy.ml ) 
  •  Cyclohexane   ( @cyclohexane@lemmy.ml ) 
  •  d3Xt3r   ( @d3Xt3r@lemmy.nz ) 
  • BE: 0.19.13
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code