My Lemmy Oracle
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
cm0002@literature.cafe to Linux@programming.dev · 1 month ago

What are some of your most useful or favorite terminal commands?

message-square
message-square
45
fedilink
44
message-square

What are some of your most useful or favorite terminal commands?

cm0002@literature.cafe to Linux@programming.dev · 1 month ago
message-square
45
fedilink

OQB @[email protected]

  • TrumpetX@programming.dev
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 month ago

    I use awk instead of cut cause I can remember the syntax better.

    ps aux | grep zoom | grep -v grep | awk ‘{print $2}’ | xargs kill -9

    • stewie410@programming.dev
      link
      fedilink
      arrow-up
      2
      ·
      1 month ago

      You can get rid of those greps, btw:

      ps aux | awk '/zoom/ && $0 !~ /awk/ {print $2}'
      

      Or just use pgrep.

      • Victor@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        1 month ago

        The greps were much more legible that this concoction 😅

        But I second the use of pgrep. 👌

        Better yet, just killall zoom.

      • TrumpetX@programming.dev
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        1 month ago

        grep is everywhere, pgrep is not

    • Victor@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      1 month ago

      May I interest you in the command killall? 😁

      • TrumpetX@programming.dev
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 month ago

        The thing with killall is I can’t see what it’s going to do first. With the greps, I can look first, kill second.

        • Victor@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          1 month ago

          True, then I would personally run pgrep first, then killall. 😊

Linux@programming.dev

linux@programming.dev

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: [email protected]

A community for everything relating to the GNU/Linux operating system (except the memes!)

Also, check out:

  • [email protected]
  • [email protected]
  • our Matrix group chat
  • [email protected]

Original icon base courtesy of [email protected] and The GIMP

Visibility: Public
globe

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

  • 426 users / day
  • 1.79K users / week
  • 4.72K users / month
  • 10.8K users / 6 months
  • 1 local subscriber
  • 11.3K subscribers
  • 3.95K Posts
  • 30.7K Comments
  • Modlog
  • mods:
  • Ategon@programming.dev
  • adr1an@programming.dev
  • dwraf_of_ignorance@programming.dev
  • BE: 0.19.5
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org