Which Linux command or utility is simple, powerful, and surprisingly unknown to many people or used less often?

This could be a command or a piece of software or an application.

For example I’m surprised to find that many people are unaware of Caddy, a very simple web server that can make setting up a reverse proxy incredibly easy.

Another example is fzf. Many people overlook this, a fast command-line fuzzy finder. It’s versatile for searching files, directories, or even shell history with minimal effort.

    • @tetris11@lemmy.ml
      link
      fedilink
      29 months ago

      task-spooler (ts aka tsp)

      This looks amazing. Do you know how well it works in dispatching and tracking jobs over remote servers (over SSH)?

      • Sʏʟᴇɴᴄᴇ
        link
        fedilink
        49 months ago

        We’ve been using tsp at my work for years and it works well. It is just a very basic queueing system so if you can run the job from the command line then you can run it via tsp.

        Our workflow is to have concurrent jobs run on the remote servers with cron and tsp but you should be able to trigger remote jobs over SSH also if you prefer to have a single machine in charge of task allocation.

  • Boomer Humor Doomergod
    link
    fedilink
    English
    289 months ago

    I’m a big fan of screen because it will let me run long-running processes without having to stay connected via SSH, and will log all the output.

    I do a lot of work on customers’ servers and having a full record of everything that happened is incredibly valuable for CYA purposes.

    • @Static_Rocket@lemmy.world
      link
      fedilink
      English
      139 months ago

      I’d recommend tmux for that particular use. Screen has a lot of extras that are interesting but don’t really follow the GNU mentality of “do one thing and do it well.”

      • @kitnaht@lemmy.world
        link
        fedilink
        109 months ago

        Tmux / Screen is like the emacs/vim of the modern day Linux I think.

        Screen is more than capable, but for those who have moved to Tmux, they will absolutely advocate for it.

      • @darklamer@lemmy.dbzer0.com
        link
        fedilink
        49 months ago

        When tmux was first released I was already so used to screen that I never really considered switching. What would some convincing arguments be for me to make the effort to switch now?

        • @Static_Rocket@lemmy.world
          link
          fedilink
          English
          49 months ago

          Tmux was purpose built for terminal multiplexing. You can assign session names for organizing and manipulating multiple instances. Send keys to and read output from detached sessions. It’s easy to script.

            • @Static_Rocket@lemmy.world
              link
              fedilink
              English
              19 months ago

              Sorry, it was, just not for exploring all of those instances at once. Should have called out the tiling function. Screen also built in a serial terminal emulator and started playing with a few other things.

        • @kablammy@sh.itjust.works
          link
          fedilink
          09 months ago

          This was a few years ago so maybe it has improved, but I found that screen would crash and lose my session history and layout too often. That was bad enough, but when it happened it had some bullshit error message about a dungeon roof falling in. I don’t mind some comedy in code or even the interface, but don’t make light of the user losing their stuff. I tried tmux and it is much more stable than screen was.

        • @notabot@lemm.ee
          link
          fedilink
          69 months ago

          The thing that got me to switch was being able to maintain my pane layout between connections. The various window and pane management niceties (naming, swapping, listing and the like) got me to stay. Now you can keep your screen, but you’d have to pry tmux from my cold, dead, tty.

    • surfrock66
      link
      fedilink
      English
      89 months ago

      I know everyone likes tmux but screen is phenomenal. I have a .screenrc I deploy everywhere with a statusbar at the bottom, a set number of pre-defined tabs, and logging to a directory (which is cleaned up after 30 days) so I can go back and figure out what I did. Great tool.

      • @pivot_root@lemmy.world
        link
        fedilink
        29 months ago

        It’s not as useful, sadly. Nohup disconnects standard input, output, and error. With screen or tmux, you can reattach them later.

    • @villainy@lemmy.world
      link
      fedilink
      79 months ago

      Woah screen is seeing active development again? There was like a decade where it stagnated. So much so that different distros were packaging different custom feature patches (IIRC only Ubuntu had a vertical split patch by default?) Looking at it now, the new screen maintainers had to skip a version to not conflict with forks that had become popular.

      When tmux stabilized I jumped ship immediately and never looked back.

      • z3rOR0ne
        link
        fedilink
        6
        edit-2
        9 months ago

        No sorry, I should have elaborated. The package name is mlocate but the command is locate. Occasionally run updatedb as it populates an sqlite db with every file on your system that you can then list out using locate followed by the filename you want to locate.

        EDIT: Lol. Sorry barely read your reply. Yes, you should wear a fedora while installing mlocate.

    • @oldfart@lemm.ee
      link
      fedilink
      28 months ago

      I immediately had flashbacks of diagnosing bad I/O performance on CentOS 5 servers. That was the week when I learned what updatedb is and why it was always running in the background (there was a lot of files)

    • @WalnutLum@lemmy.ml
      link
      fedilink
      29 months ago

      I love locate! I have a cronjob that updates the db every night, then I can just find a file without having to think about where it is

  • @kitnaht@lemmy.world
    link
    fedilink
    10
    edit-2
    9 months ago

    I like https://github.com/aristocratos/btop personally. It’s way prettier than the normal top command which you use to watch processes to find the one that’s hogging all of the CPU or whatever. And it’s not so much that it’s underrated so much as it’s not very well known or distributed by default.

    • @tetris11@lemmy.ml
      link
      fedilink
      3
      edit-2
      9 months ago

      Gripes:

      • starship and all these shell frameworks are overbloated. Just write your own prompt command and be done with it.

      • restic, ongoing issue with the author to allow people to backup without a password. Seems lime a no-brainer but he’s being difficult

  • yq is crazy cool for converting between different text-based data formats such as yaml, json, xml, csv and others, and it has a super nice pretty-printing function as well. I use it all the time!

    Just be aware that your distroy might come with a yq variant too, but possibly one that isn’t as powerful as the one I linked. I know this to be true at least for Ubuntu.

  • @bamboo@lemmy.blahaj.zone
    link
    fedilink
    English
    189 months ago

    dd is probably well known, but one of the simplest and most powerful ways to accidentally delete all data on your hard drive. dd if=/dev/random of=/dev/sda

    • @I_Miss_Daniel@lemmy.world
      link
      fedilink
      English
      49 months ago

      ddrescue (or gddrescue) is a great version if you have a sick drive. It’ll try to copy the good areas first then go back to hammer on the sick areas.

      Not perfect as it doesn’t know about the file system so it tries to copy the entire surface, but generally a good tool.

  • @deathbird@mander.xyz
    link
    fedilink
    9
    edit-2
    9 months ago

    Underrated? I’d say lftp is the best FTP command line client there is. And Midnight Commander is a very very good file browser. I don’t see either praised enough.

    • The terminal-based file browser space is so filled today but for my part I love what vifm has done for the dual-pane midnight commander concept - it’s the same basic idea, uses (somewhat) vim-like bindings by default and is super extensible.

    • @friend_of_satan@lemmy.world
      link
      fedilink
      English
      29 months ago

      Great call out! I first used ftp about 30 years ago, and lftp has been my go to for about the last decade. I rarely need it anymore, but I still use it for quickly transferring files with my homebrew switch.

  • @friend_of_satan@lemmy.world
    link
    fedilink
    English
    26
    edit-2
    9 months ago

    Not powerful, but often useful, column -t aligns columns in all lines. EG

    $ echo {a,bb,ccc}{5,10,9999,888} | xargs -n3
    a5 a10 a9999
    a888 bb5 bb10
    bb9999 bb888 ccc5
    ccc10 ccc9999 ccc888
    $ echo {a,bb,ccc}{5,10,9999,888} | xargs -n3 | column -t
    a5      a10      a9999
    a888    bb5      bb10
    bb9999  bb888    ccc5
    ccc10   ccc9999  ccc888