this post was submitted on 21 Sep 2024
218 points (97.0% liked)

Asklemmy

47617 readers
926 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_[email protected]~

founded 6 years ago
MODERATORS
(page 3) 50 comments
sorted by: hot top controversial new old
[โ€“] [email protected] 14 points 7 months 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).

[โ€“] [email protected] 3 points 7 months ago (2 children)

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

load more comments (2 replies)
[โ€“] [email protected] 5 points 7 months ago

GNU Parallel

[โ€“] [email protected] 4 points 7 months ago* (last edited 7 months 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

[โ€“] [email protected] 2 points 7 months ago
[โ€“] [email protected] 7 points 7 months ago (1 children)
[โ€“] [email protected] 9 points 7 months ago (1 children)

let me guess, you either use arch or gentoo

load more comments (1 replies)
[โ€“] [email protected] 55 points 7 months ago* (last edited 7 months ago) (5 children)

cd then ls then cd then ls maybe Iโ€™ll throw a ls -a

[โ€“] [email protected] 13 points 7 months ago

I use -A instead, which doesn't show "." and ".."

load more comments (4 replies)
[โ€“] [email protected] 20 points 7 months ago (1 children)

Uhhh...sudo su

Don't be like me

[โ€“] [email protected] 7 points 7 months ago
[โ€“] [email protected] 9 points 7 months ago (1 children)

Btop is an amazing resource monitor

[โ€“] [email protected] 1 points 7 months ago (1 children)
[โ€“] [email protected] 1 points 7 months ago

Never heard of it, looks cool but not as pretty as btop. Also has a ton of information I don't personally care about so for me it doesn't seem great.

[โ€“] [email protected] 31 points 7 months ago (2 children)

clear because apparently I am too scatterbrained to comprehend more than one full page of text in the terminal

[โ€“] [email protected] 4 points 7 months ago (5 children)

I almost never use clear because i'm afraid if i will need the text later.(just like infinity tab number on firefox)

load more comments (5 replies)
load more comments (1 replies)
[โ€“] [email protected] 7 points 7 months ago (2 children)
load more comments (2 replies)
[โ€“] [email protected] 36 points 7 months ago (4 children)

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.

[โ€“] [email protected] 10 points 7 months ago (1 children)
[โ€“] [email protected] 6 points 7 months ago (1 children)

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.

[โ€“] [email protected] 4 points 7 months ago (1 children)

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

load more comments (1 replies)
[โ€“] [email protected] 5 points 7 months ago

Holy shit, you're a madman

load more comments (2 replies)
[โ€“] [email protected] 6 points 7 months ago

du -sh /too/bar to get size of files/folders. sudo !! inserts sudo into previous command when forgotten. yay for full system update if yay is installed. cat reads files.

load more comments
view more: โ€น prev next โ€บ