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

Asklemmy

47617 readers
918 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 6) 38 comments
sorted by: hot top controversial new old
[–] [email protected] 30 points 7 months ago (21 children)

Since nobody has said yet, I use screen pretty heavily. Want to run a long running task, starting it from your phone? Run screen to create a detachable session then the long running command. You can then safely close out of your terminal or detach with ctrl a, d and continue in your terminal doing something else. screen -r to get back to it.

load more comments (21 replies)
[–] [email protected] 38 points 7 months ago (1 children)

sudo udevadm monitor

Figuring out which usb device went on holiday.

load more comments (1 replies)
[–] [email protected] 3 points 7 months ago (1 children)
load more comments (1 replies)
[–] [email protected] 12 points 7 months ago (1 children)
[–] [email protected] 12 points 7 months ago (2 children)
load more comments (2 replies)
[–] [email protected] 11 points 7 months ago (3 children)

sudo rm -rf /

Very powerful yet helpful command :-)

[–] [email protected] 19 points 7 months ago (4 children)

Someone has to say this. Don't do it anyone

[–] [email protected] 7 points 7 months ago (1 children)

Instructions unclear, dick now stuck in computer.

load more comments (1 replies)
[–] [email protected] 15 points 7 months ago

Agree. Don’t just copy and paste CLI commands you find on the internet, suggested by a stranger

load more comments (2 replies)
load more comments (2 replies)
[–] [email protected] 25 points 7 months ago (1 children)

pushd and popd to change directory and go back when done there.

[–] [email protected] 4 points 7 months ago (2 children)

Even better when cd automatically invokes pushd.

[–] [email protected] 29 points 7 months ago (2 children)

cd - undoes the last cd. Not quite push/popd but still useful. Pro tip, works also: git checkout -

load more comments (2 replies)
load more comments (1 replies)
[–] [email protected] 8 points 7 months ago (1 children)

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

[–] [email protected] 1 points 7 months ago (1 children)

Example of said Black Magik?

[–] [email protected] 9 points 7 months ago (5 children)

Let's say, for example, you have a directory of files named x01-001; x01-002; x02-001; x02-002; x03-001... and so on.

I want to create subdirectories for each 'x' iteration and move each set to the corresponding subdirectory. My loop would look like this:

for i in {1..3}; do mkdir Data_x0$i && mv x0$i* Data_x0$i; done

I've also been using it if I need to rename large batches of files quickly.

load more comments (5 replies)
[–] [email protected] 6 points 7 months ago (1 children)
load more comments (1 replies)
[–] [email protected] 24 points 7 months ago* (last edited 7 months ago)

After using too much WINE, I type pwd, whoami

[–] [email protected] 11 points 7 months ago* (last edited 7 months ago)
  • man
  • fd
  • entr
  • rg
  • gitui
  • nvim
  • tee
  • cd
  • mv
  • rm
  • ls
  • tmux
  • btop
  • yazi
  • du
  • xargs
  • cat
  • less
[–] [email protected] 9 points 7 months ago (1 children)
[–] [email protected] 3 points 7 months ago* (last edited 7 months ago) (2 children)

ll

Is an alias for

ls -al

yea?

load more comments (2 replies)
[–] [email protected] 45 points 7 months ago (2 children)

I really like that cd command. :P

[–] [email protected] 20 points 7 months ago (1 children)
[–] [email protected] 5 points 7 months ago (1 children)

Hm I wonder, is it really a command? I thought it is just a function of the shell to change the working directory.

load more comments (1 replies)
[–] [email protected] 10 points 7 months ago (1 children)

On my desktop: df -h to check disk usage htop to see resource usage ll list directory contents

[–] [email protected] 11 points 7 months ago (1 children)

I recently found btop and am trying to use that instead of htop.

[–] [email protected] 9 points 7 months ago

looks up btop ooooo

[–] [email protected] 9 points 7 months ago

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

[–] [email protected] 8 points 7 months ago (2 children)
[–] [email protected] 6 points 7 months ago* (last edited 7 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.

[–] [email protected] 2 points 7 months ago

A lot of distros include a .bashrc with common ls aliases commented out, just waiting for you to activate them if you like.

[–] [email protected] 7 points 7 months ago (2 children)

You might like eza even more!

[–] [email protected] 2 points 7 months ago (6 children)

Hmm, that's not working for me. You mean use those as options? 'ls -eza'?

[–] [email protected] 4 points 7 months ago (1 children)
[–] [email protected] 1 points 7 months ago* (last edited 7 months ago) (1 children)

Aha. Well, I guess I'm not the target audience because I can't be bothered to go through the installation steps. It's not in the LMDE repository, but I wish it were!

load more comments (1 replies)
load more comments (5 replies)
load more comments (1 replies)
load more comments (1 replies)
load more comments
view more: β€Ή prev next β€Ί