- man
- fd
- entr
- rg
- gitui
- nvim
- tee
- cd
- mv
- rm
- ls
- tmux
- btop
- yazi
- du
- xargs
- cat
- less
Asklemmy
A loosely moderated place to ask open-ended questions
Search asklemmy ๐
If your post meets the following criteria, it's welcome here!
- Open-ended question
- 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.
- Not regarding using or support for Lemmy: context, see the list of support communities and tools for finding communities below
- Not ad nauseam inducing: please make sure it is a question that would be new to most members
- An actual topic of discussion
Looking for support?
Looking for a community?
- Lemmyverse: community search
- sub.rehab: maps old subreddits to fediverse options, marks official as such
- [email protected]: a community for finding communities
~Icon~ ~by~ ~@Double_[email protected]~
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.
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.
ls -al
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.
I recently learned to use a for loop on the command line to organize hundreds of files in a few seconds.
jq
sudo rm -rf /
Very powerful yet helpful command :-)
I did this on my personal computer just to prove a point.
Seems like an appropriate place to share https://github.com/agarrharr/awesome-cli-apps
I'm a fan of ripgrep and lsd in particular.
ncdu
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
Chuck the -y in there for extra lazy mode
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.
touch
๐
I remember touch
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.
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 }
I've recently started using tmux
when starting a new SSH session to try to build the habit.
g-push
which is alias for
git push origin `git branch --show`
Which I'm writing on my phone without testing or looking
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).