Usenet
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
cybercitizen4@lemm.ee to Asklemmy@lemmy.ml · 9 months ago

What's a handy terminal command you use often?

message-square
message-square
238
fedilink
1
message-square

What's a handy terminal command you use often?

cybercitizen4@lemm.ee to Asklemmy@lemmy.ml · 9 months ago
message-square
238
fedilink
alert-triangle
You must log in or # to comment.
  • ☂️-@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    9 months ago

    control+R

    in bash, it lets you quickly search for previously executed commands.

    its very useful and makes things much quicker, i recommend you give it a try.

    • secret300@lemmy.sdf.org
      link
      fedilink
      arrow-up
      0
      ·
      9 months ago

      I use this constantly

      • huf [he/him]@hexbear.net
        link
        fedilink
        English
        arrow-up
        0
        ·
        9 months ago

        i rely on this in my job. if i really need it, i’ll be using it often enough that it’ll always be in ^R distance :)

  • RagingRobot@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    9 months 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

    • darvit@lemmy.darvit.nl
      link
      fedilink
      arrow-up
      0
      ·
      9 months 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.

    • AnIndefiniteArticle@sh.itjust.works
      link
      fedilink
      arrow-up
      0
      ·
      9 months ago

      And then ctrl+y to paste it back and recover that text.

    • emergencybird@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      9 months ago

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

    • potentiallynotfelix@lemmy.fish
      link
      fedilink
      English
      arrow-up
      0
      ·
      9 months ago

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

    • call_me_xale@lemmy.zip
      link
      fedilink
      arrow-up
      0
      ·
      9 months ago

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

  • LEVI@feddit.org
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    2 months ago

    deleted by creator

  • berryjam@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    9 months ago

    qalc

  • Cruxil 🇦🇺@aussie.zone
    link
    fedilink
    English
    arrow-up
    0
    ·
    9 months ago

    I’ve recently started using tmux when starting a new SSH session to try to build the habit.

    https://github.com/tmux/tmux/wiki

  • Hackerman_uwu@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    9 months ago

    rsync

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

  • unionagainstdhmo@aussie.zone
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    8 months ago

    deleted by creator

  • InSamsara@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    9 months ago

    Neofetch

    I just think it’s neat.

    • theshatterstone54@feddit.uk
      link
      fedilink
      arrow-up
      0
      ·
      edit-2
      9 months ago

      It’s been abandoned btw. People recommend to switch to alternatives. Fastfetch and hyfetch seem to be the best ones rn.

      Though I can’t confirm as I wrote my own minimal fetch

  • pocopene@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    9 months ago

    ncdu

  • sgtnasty@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    9 months 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.

  • macattack@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    9 months ago

    Getting cheatsheets via curl cheat.sh/INSERT_COMMAND_HERE

    No install necessary, Also, you can quickly search within the cheatsheets via ~. For example if you copy curl cheat.sh/ls~find will show all the examples of ls that use find. If you remove ~find, then it shows all examples of ls.

    I have a function in my bash alias for it (also piped into more for readability):

    function cht() { curl cheat.sh/"$1"?style=igor|more }

  • NaevaTheRat [she/her]@vegantheoryclub.org
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    9 months ago

    Not a command but bang expansions. For example !? is the args of last command useful for stuff like mkdir foo ; cd !?

    https://www.redhat.com/sysadmin/bash-bang-commands learn these. you suck at using your computer if you don’t know them.

  • lud@lemm.ee
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    2 days ago

    deleted by creator

    • hactar42@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      9 months ago

      There are dozens of us.

      Also, I’ll add:

      • Get-Help
      • Get-Command
      • Get-Member
    • mexicancartel@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      0
      ·
      9 months ago

      • lud@lemm.ee
        link
        fedilink
        arrow-up
        0
        ·
        edit-2
        2 days ago

        deleted by creator

  • huf [he/him]@hexbear.net
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    9 months ago
    • atools, which includes als, aunpack, apack. so you can stop caring about the kind of archive and just unpack it. it also saves you from shit archives that have multiple files/dirs in their root.
    • perl -e / perl -lne / …
    • units
    • bc - a calculator that’s actually good
    • pass - the only non-shit password store tool i’ve found so far. no gui, uses gpg and git to do the encrypting and storage/sharing
    • alias lr='ls -lrth' - so you can easily find the newest file, cos that’s frequently what you want
    • unip - my script to look up things in the unicode db
    • find -type f -exec xzgrep 're' {} + - because xzgrep cant do -r

    oh yeah, and for the shell readline, alt-b, alt-f, ctrl-w, ctrl-u, ctrl-k, ctrl-a, ctrl-e

  • CameronDev@programming.dev
    link
    fedilink
    arrow-up
    0
    ·
    9 months ago

    touch 😏

    • sem@lemmy.blahaj.zone
      link
      fedilink
      arrow-up
      0
      ·
      9 months ago

      I remember touch

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.

  • 149 users / day
  • 698 users / week
  • 2.23K users / month
  • 8.01K users / 6 months
  • 0 local subscribers
  • 49K subscribers
  • 5.34K Posts
  • 181K Comments
  • Modlog
  • mods:
  • Evan@lemmy.ml
  • mekhos@lemmy.ml
  • tmpod@lemmy.pt
  • OrangeSlice@lemmy.ml
  • BE: 0.19.7
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org