this post was submitted on 21 Sep 2024
143 points (96.1% liked)

Asklemmy

43417 readers
1761 users here now

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~

founded 5 years ago
MODERATORS
top 50 comments
sorted by: hot top controversial new old
[โ€“] lluki@feddit.org 2 points 1 hour ago

xdg-open FILE - opens a file with the default GUI app. I use it for example to open PDFs and PNG. I have a one letter alias for that. It can also open a file explorer in the current directory xdg-open . . Should work on any compliant desktop environment (gnome/kde).

[โ€“] pyr0ball@sh.itjust.works 3 points 4 hours ago* (last edited 4 hours ago)

Going to shamelessly plug my custom bashrc setup which has a ton of little scripting helpers and a few useful aliases. Remember to clone recursively if you want to try it out. (Still very much a work in progress, but it's getting to be pretty robust)

https://GitHub.com/pyr0ball/PRbL-bashrc.git

[โ€“] Revan343@lemmy.ca 11 points 8 hours ago (1 children)

Uhhh...sudo su

Don't be like me

load more comments (1 replies)
[โ€“] kittenzrulz123@lemmy.blahaj.zone 5 points 8 hours ago (2 children)

Btop is an amazing resource monitor

load more comments (2 replies)
[โ€“] NaevaTheRat@vegantheoryclub.org 8 points 12 hours ago* (last edited 12 hours ago) (1 children)

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.

[โ€“] Andromxda@lemmy.dbzer0.com 1 points 11 hours ago

Is there something similar in fish shell?

[โ€“] Shimon@slrpnk.net 6 points 12 hours ago (2 children)
[โ€“] nailbar@sopuli.xyz 1 points 2 hours ago
load more comments (1 replies)
[โ€“] Bougie_Birdie@lemmy.blahaj.zone 20 points 19 hours ago (3 children)

Not a specific command, but I learned recently you can just dump any executable script into ~/bin and run it from the terminal.

I suffer greatly from analysis paralysis, I have a very hard time making decisions especially if there's many options. So I wrote a script that reads a text file full of tasks and just picks one. It took me like ten minutes to write and now I spend far more time doing stuff instead of doing nothing and feeling badly that I can't decide what to do.

or add it to path

load more comments (2 replies)
[โ€“] huf@hexbear.net 5 points 16 hours ago* (last edited 16 hours 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

[โ€“] hit_the_rails@reddthat.com 11 points 19 hours ago (3 children)
load more comments (3 replies)
[โ€“] LambdaRX@sh.itjust.works 22 points 22 hours ago* (last edited 22 hours ago)

After using too much WINE, I type pwd, whoami

[โ€“] macattack@lemmy.world 5 points 17 hours ago* (last edited 17 hours 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 }

[โ€“] technocat@lemm.ee 10 points 22 hours ago* (last edited 13 hours ago)
  • man
  • fd
  • entr
  • rg
  • gitui
  • nvim
  • tee
  • cd
  • mv
  • rm
  • ls
  • tmux
  • btop
  • yazi
  • du
  • xargs
  • cat
  • less
[โ€“] z3rOR0ne@lemmy.ml 5 points 20 hours ago* (last edited 20 hours ago)

locate, from the mlocate package. So useful. Honorable mention goes out to tldr.

[โ€“] FrostyCaveman@lemm.ee 4 points 19 hours ago
[โ€“] kionite231@lemmy.ca 5 points 20 hours ago (3 children)
[โ€“] gitamar@feddit.org 2 points 13 hours ago

Awesome, didn't know fzf yet

load more comments (2 replies)
load more comments
view more: next โ€บ