448
submitted 10 months ago by Pantherina@feddit.de to c/linuxmemes@lemmy.world

image of a cat looking at a bunch of paper a woman shows it, with the header "cat ~/.bash_history"

all 24 comments
sorted by: hot top controversial new old
[-] XEAL@lemm.ee 25 points 10 months ago

A colleague mocked me the other day because I didn't know about the "history" command and I was using "cat .bash_history"

[-] Rin@lemm.ee 33 points 10 months ago

So, yk how the history command outputs something like this:

1   Abcd
2   Efgh
3   Ijkl

If you run !2, you will run Efgh.

It blew my mind the first time I saw it, but maybe I'm just stupid.

[-] XEAL@lemm.ee 17 points 10 months ago

I actually use quite frequently "sudo !!“, but I didn't know the details of why it worked...

Now I see more sense in using the history command, specially combined with grep.

[-] platypus_plumba@lemmy.world 2 points 10 months ago

Same here, I just assumed it was a special thing that saved the last command. Had no idea it was actually a query to the history

[-] lemann@lemmy.one 5 points 10 months ago
[-] rtxn@lemmy.world 3 points 10 months ago
[-] PipedLinkBot@feddit.rocks 3 points 10 months ago

Here is an alternative Piped link(s):

https://www.piped.video/watch?v=sXx7b0uCWkk

Piped is a privacy-respecting open-source alternative frontend to YouTube.

I'm open-source; check me out at GitHub.

[-] vox@sopuli.xyz 7 points 10 months ago
[-] meekah@lemmy.world 4 points 10 months ago* (last edited 10 months ago)

they mean arrow up, right?

[-] Presi300@lemmy.world 15 points 10 months ago
[-] dukk@programming.dev 7 points 10 months ago
[-] Pantherina@feddit.de 4 points 10 months ago

Laughs hardest in nutshell

[-] caseyweederman@lemmy.ca 4 points 10 months ago
[-] Pantherina@feddit.de 2 points 10 months ago

Ponies in Ponyshell?

[-] JackGreenEarth@lemm.ee 11 points 10 months ago

Get your Apple product placement out of here!

[-] RegalPotoo@lemmy.world 8 points 10 months ago

Talk to your cat about set +o history before they end up leaking credentials

[-] palordrolap@kbin.social 2 points 10 months ago

Can also recommend HISTFILE="", which amounts to the same thing.

[-] RegalPotoo@lemmy.world 3 points 10 months ago

Not quite. Unsetting HISTFILE, or setting it to an invalid path will mean the shell doesn't update the history file while it quits. set +o history makes the shell stop recording until you do set -o history, which is useful if you want shell history generally, but don't want some specific commands to be recorded - if you just unset HISTFILE, the commands still show up if you press the up arrow

[-] ludwik@sh.itjust.works 1 points 10 months ago

Real OGs put a space right after the prompt.

[-] synae 4 points 10 months ago
[-] tetraodon@feddit.it 1 points 10 months ago

Another fzf'er

[-] rickdg@lemmy.world 1 points 10 months ago

Not enough bashing.

[-] creditCrazy@lemmy.world 1 points 10 months ago

Scammers trying to make a virus to infect Linux users

this post was submitted on 19 Nov 2023
448 points (97.9% liked)

linuxmemes

20901 readers
1766 users here now

I use Arch btw


Sister communities:

Community rules

  1. Follow the site-wide rules and code of conduct
  2. Be civil
  3. Post Linux-related content
  4. No recent reposts

Please report posts and comments that break these rules!

founded 1 year ago
MODERATORS