this post was submitted on 21 Sep 2024
215 points (97.4% liked)

Asklemmy

43936 readers
436 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
(page 2) 50 comments
sorted by: hot top controversial new old
[โ€“] kittenzrulz123@lemmy.blahaj.zone 9 points 2 months ago (2 children)

Btop is an amazing resource monitor

load more comments (2 replies)
[โ€“] blackstrat@lemmy.fwgx.uk 9 points 2 months ago (3 children)
load more comments (3 replies)
[โ€“] hit_the_rails@reddthat.com 9 points 2 months ago (6 children)
load more comments (6 replies)
[โ€“] beirdobaggins@lemmy.world 9 points 2 months ago

diff -y -W 200 file1 file2

Shows a side by side diff of 2 files with enough column width to see most of what I need usually.

I have actually aliased this command as diffy

ctrl-r

searching bash history

du -sh * | sort -h

shows size of all files and dirs in the current dir and sorts them in ascending order so you can easily see the largest files or dirt ant the end of the list

ls -ltr

Shows the most recently modified files at the end of the listing.

[โ€“] nichtburningturtle 9 points 2 months ago

nmtui. But that's because my router is trash.

[โ€“] _thebrain_@sh.itjust.works 8 points 2 months ago (7 children)

Not a command as much as I press the up arrow a lot. I'm.pretty lazy and hitting the up arrow 12 times is easier then retyping a complex rsync command.

load more comments (7 replies)
[โ€“] NaevaTheRat@vegantheoryclub.org 8 points 2 months ago* (last edited 2 months 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.

load more comments (1 replies)
[โ€“] pocopene@lemmy.world 8 points 2 months ago
[โ€“] anonymouse2@sh.itjust.works 8 points 2 months ago (7 children)

I recently learned to use a for loop on the command line to organize hundreds of files in a few seconds.

load more comments (7 replies)
[โ€“] korthrun@lemmy.sdf.org 7 points 2 months ago (1 children)

Seems like an appropriate place to share https://github.com/agarrharr/awesome-cli-apps

I'm a fan of ripgrep and lsd in particular.

load more comments (1 replies)
[โ€“] NauticalNoodle@lemmy.ml 7 points 2 months ago* (last edited 2 months ago) (2 children)

For Debian based/descended distros:

sudo apt-get update && sudo apt-get upgrade

And technically I also regularly use

redshift -O 3000

all of the blue light filter programs try to align themselves with a user's geographic location and time, but I don't keep normal hours

[โ€“] sirico@feddit.uk 8 points 2 months ago (1 children)

Chuck the -y in there for extra lazy mode

[โ€“] NauticalNoodle@lemmy.ml 6 points 2 months ago

I would but much like somebody else's recent post I have in the past nuked my install by blindly agreeing to some recommended software removals before. These days I like to double check what packages are being updated and replaced.

load more comments (1 replies)
[โ€“] Wuttin@lemmy.ml 7 points 2 months ago
[โ€“] DirigibleProtein@aussie.zone 7 points 2 months ago (2 children)
[โ€“] walden@sub.wetshaving.social 6 points 2 months ago* (last edited 2 months ago) (2 children)

I learned you can edit .bashrc (in your home dir) and update the alias for ls to include what I like. It has saved me lots of keystrokes. Mine is ls -lha in addition to whatever color coding stuff is there by default.

[โ€“] jbrains@sh.itjust.works 7 points 2 months ago (10 children)

You might like eza even more!

load more comments (10 replies)
load more comments (1 replies)
load more comments (1 replies)
[โ€“] JoMiran@lemmy.ml 7 points 2 months ago (3 children)
load more comments (3 replies)
[โ€“] sp451@lemmy.sdf.org 7 points 2 months ago (7 children)

sudo rm -rf /

Very powerful yet helpful command :-)

I did this on my personal computer just to prove a point.

load more comments (6 replies)
[โ€“] pineapplelover@lemm.ee 7 points 2 months ago (2 children)
load more comments (2 replies)
[โ€“] nameisnotimportant@lemmy.ml 6 points 2 months ago (1 children)
load more comments (1 replies)
[โ€“] Spider89@lemm.ee 6 points 2 months ago (2 children)
load more comments (2 replies)
[โ€“] Cruxil@aussie.zone 6 points 2 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

[โ€“] olafurp@lemmy.world 6 points 2 months ago (4 children)

g-push which is alias for

git push origin `git branch --show`

Which I'm writing on my phone without testing or looking

load more comments (4 replies)
[โ€“] alsimoneau@lemmy.ca 5 points 2 months ago* (last edited 2 months ago) (1 children)
load more comments (1 replies)
[โ€“] plumcreek@lemmy.ml 5 points 2 months ago (1 children)

qmv -f do ${dir}

... for quickly moving and renaming files. The default 'qmv' opens up your preferred text editor with a list of the source and destination name of the directory of files you want to move/rename. The '-f do' tells the command we only want to see/edit the [d]estination [o]nly. If you need to rename/move a bunch of files, it's much quicker to do it in vim (at least for me).

load more comments (1 replies)
load more comments
view more: โ€น prev next โ€บ