lemmy.billiam.net
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
cybercitizen4@lemm.ee to Asklemmy@lemmy.ml · 1 year ago

What's a handy terminal command you use often?

message-square
message-square
265
link
fedilink
223
message-square

What's a handy terminal command you use often?

cybercitizen4@lemm.ee to Asklemmy@lemmy.ml · 1 year ago
message-square
265
link
fedilink
alert-triangle
You must log in or # to comment.
  • BigLime@lemmy.ml
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 year ago

    Neofetch

    • Sneezycat@sopuli.xyz
      link
      fedilink
      arrow-up
      7
      ·
      1 year ago

      Get on with the times, install fastfetch ;)

  • sgtnasty@lemmy.ml
    link
    fedilink
    arrow-up
    21
    ·
    1 year ago

    pv (Pipe Viewer) is a command line tool to view verbose information about data streamed/piped through it. The data can be of any source like files, block devices, network streams etc. It shows the amount of data passed through, time running, progress bar, percentage and the estimated completion time.

  • nameisnotimportant@lemmy.ml
    link
    fedilink
    English
    arrow-up
    6
    ·
    1 year ago

    I use atuin (link) all the time

    • seth@lemmy.world
      link
      fedilink
      arrow-up
      1
      arrow-down
      1
      ·
      1 year ago

      deleted by creator

  • electric_nan@lemmy.ml
    link
    fedilink
    arrow-up
    3
    ·
    1 year ago

    Saving this thread for later, but I use rsync -a a lot.

    • blackbirdbiryani@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      Have you heard of our lord and saviour rclone?

      I haven’t gone back to rsync in a long time.

      • electric_nan@lemmy.ml
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        I use it to mount cloud storage as network drives… I’ll have to look into your implication though!

  • Jo Miran@lemmy.ml
    link
    fedilink
    arrow-up
    13
    arrow-down
    1
    ·
    1 year ago

    sudo

    • LambdaRX@sh.itjust.works
      link
      fedilink
      arrow-up
      12
      ·
      1 year ago

      Make me a sandwich.

      • Nicht BurningTurtle@feddit.org
        link
        fedilink
        arrow-up
        15
        ·
        1 year ago

        LambdaRX is not in the sudoers file. This incident will be reported

        • LambdaRX@sh.itjust.works
          link
          fedilink
          arrow-up
          5
          ·
          1 year ago

          Eh, guess I won’t get anything for christmas.

  • pemptago@lemmy.ml
    link
    fedilink
    English
    arrow-up
    38
    ·
    1 year ago

    I went a little overboard and wrote a one-liner to accurately answer this question

    history|cut -d " " -f 5|sort|uniq -c|sort -nr|head -5
    

    Note: history displays like this for me 20622 2023-02-18 16:41:23 ls I don’t know if that’s because I set HISTTIMEFORMAT='%F %T ' in .bashrc, or if it’s like that for everyone. If it’s different for you change -f 5 to target the command. Use -f 5-7 to include flags and arguments.

    My top 5 (since last install)

       2002 ls
       1296 cd
        455 hx
        427 g
        316 find
    

    g is an alias for gitui. When I include flags and arguments most of the top commands are aliases, often shortcuts to a project directory.

    Not to ramble, but after doing this I figured I should alias the longest, most-used commands (even aliasing ls to l could have saved 2002 keystrokes :P) So I wrote another one-liner to check for available single characters to alias with:

    for c in a b c d e f g h i j k l m n o p q r s t u v w x y z; do [[ ! $(command -v $c) ]] && echo $c; done
    

    In .bash_aliases I’ve added alias b='hx ${HOME}/.bash_aliases' to quickly edit aliases and alias r='source ${HOME}/.bashrc' to reload them.

    • BaumGeist@lemmy.ml
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      10 months ago

      deleted by creator

    • MigratingtoLemmy@lemmy.world
      link
      fedilink
      English
      arrow-up
      10
      ·
      1 year ago

      Helix?

      • pemptago@lemmy.ml
        link
        fedilink
        English
        arrow-up
        6
        ·
        1 year ago

        Yup! Migrated from VSCodium; wanted to learn a modal editor but didn’t have the time or confidence to configure vim or neovim. It’s been my go-to editor for 2+ years now.

        • MigratingtoLemmy@lemmy.world
          link
          fedilink
          English
          arrow-up
          4
          ·
          1 year ago

          I’ve been using vi (just the basics) for ~4 years, I don’t think I could be arsed to pick up the keybindings the other way around lol. I’ve heard very good things about Helix, of course

          • HeartyOfGlass@lemm.ee
            link
            fedilink
            English
            arrow-up
            3
            ·
            1 year ago

            As another longtime Vi user - I had a hell of a time & wound up switching back lol

            I think for a lot of folks Helix would be intuitive. Vi has her hooks in me, though.

    • JackbyDev@programming.dev
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      history -i

    • flambonkscious@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      6
      arrow-down
      1
      ·
      1 year ago

      Holy shit, you’re a madman

  • krash@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    deleted by creator

  • 10_0@lemmy.ml
    link
    fedilink
    arrow-up
    7
    arrow-down
    4
    ·
    edit-2
    1 year ago

    deleted by creator

  • I_Miss_Daniel@lemmy.world
    link
    fedilink
    English
    arrow-up
    38
    ·
    1 year ago

    sudo udevadm monitor

    Figuring out which usb device went on holiday.

    • tetris11@lemmy.ml
      link
      fedilink
      arrow-up
      8
      ·
      1 year ago

      Wow, super useful command. Starring this comment

  • Korthrun@lemmy.sdf.org
    link
    fedilink
    arrow-up
    9
    arrow-down
    1
    ·
    1 year ago

    Seems like an appropriate place to share https://github.com/agarrharr/awesome-cli-apps

    I’m a fan of ripgrep and lsd in particular.

    • x00za@lemmy.dbzer0.comBanned
      link
      fedilink
      English
      arrow-up
      5
      ·
      edit-2
      1 year ago

      Removed by mod

  • blackstrat@lemmy.fwgx.uk
    link
    fedilink
    arrow-up
    9
    ·
    1 year ago

    ll

    df -h

    du -sch

    Ctrl+r

    • notfromhere@lemmy.ml
      link
      fedilink
      arrow-up
      3
      ·
      1 year ago

      ll

      Is an alias for

      ls -al
      

      yea?

      • subtext@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        I set mine to

        ls -lAh
        
      • blackstrat@lemmy.fwgx.uk
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        I have it as ls -alFh

  • Hackerman_uwu@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    1 year ago

    rsync

    I use it to backup important work to an external drive.

  • ripcord@lemmy.world
    link
    fedilink
    arrow-up
    12
    ·
    1 year ago

    ls

    • ace_garp@lemmy.world
      link
      fedilink
      arrow-up
      4
      ·
      1 year ago

      ls -ltrc

      Show most recently modified files.

  • itsame@lemmy.world
    link
    fedilink
    arrow-up
    25
    ·
    1 year ago

    pushd and popd to change directory and go back when done there.

    • jbrains@sh.itjust.works
      link
      fedilink
      arrow-up
      4
      ·
      1 year ago

      Even better when cd automatically invokes pushd.

      • tetris11@lemmy.ml
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        what’s your alias?

      • lluki@feddit.org
        link
        fedilink
        arrow-up
        29
        ·
        1 year ago

        cd - undoes the last cd. Not quite push/popd but still useful. Pro tip, works also: git checkout -

        • med@sh.itjust.works
          link
          fedilink
          arrow-up
          4
          ·
          1 year ago

          Hell yeah. Every one of these threads makes me more inclined to read man pages

          • 7dev7random7@suppo.fi
            link
            fedilink
            arrow-up
            2
            ·
            1 year ago

            You should. These are the actually sources to learn.

  • RagingRobot@lemmy.world
    link
    fedilink
    arrow-up
    16
    ·
    1 year ago

    CTR + u will delete the whole command. I use that a lot so I don’t have to backspace. It’s saved me a ton of time

    • AnIndefiniteArticle@sh.itjust.works
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      deleted by creator

    • call_me_xale@lemmy.zip
      link
      fedilink
      arrow-up
      17
      ·
      1 year ago

      Related: Alt + ., to cycle through arguments used in previous commands

    • emergencybird@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      This is great for when you type in your root password incorrectly!

    • potentiallynotfelix@lemmy.fish
      link
      fedilink
      English
      arrow-up
      5
      ·
      1 year ago

      I just use control C, is there a difference other than whether the line shows up or not?

    • darvit@lemmy.darvit.nl
      link
      fedilink
      arrow-up
      4
      ·
      1 year ago

      How about ctrl+c to cancel and clear the command you are typing? It’s much easier because you only need 1 hand, and does not impact your shell’s history.

Asklemmy@lemmy.ml

asklemmy@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: !asklemmy@lemmy.ml

A loosely moderated place to ask open-ended questions

Search asklemmy 🔍

If your post meets the following criteria, it’s welcome here!

  1. Open-ended question
  2. Not offensive: at this point, we do not have the bandwidth to moderate overtly political discussions. Assume best intent and be excellent to each other.
  3. Not regarding using or support for Lemmy: context, see the list of support communities and tools for finding communities below
  4. Not ad nauseam inducing: please make sure it is a question that would be new to most members
  5. An actual topic of discussion

Looking for support?

  • !lemmy_support@lemmy.ml
  • !fediverse@lemmy.ml
  • !selfhosted@lemmy.world

Looking for a community?

  • Lemmyverse: community search
  • sub.rehab: maps old subreddits to fediverse options, marks official as such
  • !lemmy411@lemmy.ca: a community for finding communities

Icon by @Double_A@discuss.tchncs.de

Visibility: Public
globe

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

  • 851 users / day
  • 2.06K users / week
  • 5.24K users / month
  • 13.1K users / 6 months
  • 3 local subscribers
  • 53.4K subscribers
  • 7.85K Posts
  • 384K Comments
  • Modlog
  • mods:
  • Evan@lemmy.ml
  • mekhos@lemmy.ml
  • tmpod@lemmy.pt
  • OrangeSlice@lemmy.ml
  • BE: 0.19.14
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org