• Eyedust@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    2
    ·
    22 hours ago

    Just thinking of commands I need to learn, and I think chroot is up there. Iirc, you can recover from some extremely bad system states with an ISO and chroot.

    I understand the basics of what it does from it’s description, I just haven’t really dived deep enough to feel comfortable with it.

  • macniel@feddit.org
    link
    fedilink
    arrow-up
    9
    ·
    2 days ago

    foobar Command – Quick Text Substitution

    doesn’t work for me (using fish) and is apparantly only available in bash; would you call that then a command?

    at Command – Schedule One-Time Tasks

    at is also not a built-in but an external tool you have to install first; but its an interesting one.

    • thingsiplay@beehaw.org
      link
      fedilink
      arrow-up
      4
      ·
      2 days ago

      doesn’t work for me (using fish) and is apparantly only available in bash; would you call that then a command?

      Right, the ^search^replace is a Bash feature. It is a builtin command, like echo or cd in example. Just because a command is not available to any other shell or if its not an independent program, does not make it not a command (in my opinion).

      However I agree its a little bit out of place here. A note that its a builtin and not universally available to every shell would have been nice in such a listing.

      • macniel@feddit.org
        link
        fedilink
        arrow-up
        7
        ·
        2 days ago

        just for the sake of being pedantic: echo is actually a program (just like ls) cd though is indeed a command. And I agree with your last statement.

  • thingsiplay@beehaw.org
    link
    fedilink
    arrow-up
    9
    ·
    2 days ago

    These lists are always nice. But how does following even fit into the topic of this post at all? These are not underrated hidden gems and most who use the terminal used it already:

    1. > file.txt Command – Overwrite a File

    Routing the stdout to a file is one of the most common used “commands” in Linux. And one to learn at the very beginning.

    1. ping -i 60 -a IP_address Command – Ping with a Custom Interval

    Probably not that useful in day to day usage, but I assume this is one of the most basic commands lot of people used it in the past to test if they have internet access. ping google.com is common, or so I thought.

    Otherwise there are some nice listings, such as at (I really should use that one too), du (actually not that hidden, but its probably underrated and people install lot of tools doing same instead) or yes (useful for certain automation, where you know the answer is to proceed). A solid list, but a little bit short and with a few questionable entries.

    • kbal@fedia.io
      link
      fedilink
      arrow-up
      4
      ·
      2 days ago

      There’s someone out there to whom the existence of ping -i 30 is news.

      The idea of using >file instead of touch file — or cp /dev/null file if it already exists — is new to me, though it doesn’t seem all that useful.

  • Mine you, this page is clearly targeted at an audience who’ve never opened a shell before; they’re all quite common, and it’s almost impossible to have spent any time in bash, zsh, or any bash-ish shell without encountering or using these. Also, a couple are not going to work at all in non-standard shells like fish, nushell, or even more common shells like ash, BusyBox, or the venerable csh, because they’re bash built-ins. There’s dependency on the GNU toolset, too; some of these commands won’t work on FreeBSD, even when running bash, because the SysV tools have different argument lists.

    • TwilightKiddy@programming.dev
      link
      fedilink
      English
      arrow-up
      4
      ·
      2 days ago

      Yea, I love du -hd 1 | sort -h when cleaning up. I absolutely love that I don’t need any extra software to quickly locate whatever takes up space. I can do this on any machine without installing anything extra.

        • TwilightKiddy@programming.dev
          link
          fedilink
          English
          arrow-up
          2
          ·
          17 hours ago

          That’s a completely different tool, though, no? I just do this for determining when I need to clean up:

          df -hx tmpfs
          

          Gives me enough information for this purpose and, again, does not require any additional software, df is part of coreutils.