2 points

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.

permalink
report
reply
6 points

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

permalink
report
reply
4 points

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

permalink
report
parent
reply
8 points

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.

permalink
report
reply
15 points

sudo !! to rerun last command as sudo.

history can be paired with !5 to run the fifth command listed in history.

permalink
report
reply
1 point

Fifth as in fifth most recent command or fifth oldest?

permalink
report
parent
reply
2 points
*

I believe it’s the fifth oldest - I think !-5 will get you the fifth impost recent, but I was shown that and haven’t put it into practice.

The most common usecase I do is something like history | grep docker to find docker commands I’ve ran, then use ! followed by the number associated with the command I want to run in history.

permalink
report
parent
reply
5 points

ls

permalink
report
reply

Asklemmy

!asklemmy@lemmy.ml

Create post

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?

Looking for a community?

Icon by @Double_A@discuss.tchncs.de

Community stats

  • 9.2K

    Monthly active users

  • 3K

    Posts

  • 50K

    Comments