clear
because apparently I am too scatterbrained to comprehend more than one full page of text in the terminalI almost never use clear because i’m afraid if i will need the text later.(just like infinity tab number on firefox)
Oh god I also do this… See the comment below, I ran
history|cut -d " " -f 5|sort|uniq -c|sort -nr|less
on my personal laptop, my third most commonly used command (behindls
andcd
) is just typing in nothing…
Use script instead, you can even have it in your .*shrc to run automatically whenever a shell is invoked (make sure to add a check that the shell wasn’t invoked by script, so you don’t inadvertently forkbomb yourself)
Alternatively, just use Terminator as yout terminal emulator and enable the logger anytime you need it to record the shell session.
Also, use bookmarks. That’s what they’re there for. 100 tabs is a great way to clutter your brain, but terrible for productivity. If you forget about it after bookmarking, it wasn’t important to begin with.
100 tabs is in mobile. I don’t even scroll back to clutter my brain but its there. Tabs are history for me… So I use firefox focus and if there is anything important, i open with firefox.
What script are you reffering to? To log all output? I don’t wanna store that but need an assurance that its there till i close terminal window lol
Sorry I didn’t make it clear that it was a command before
I like using CRTL+L to clear. It’s nice because you can have a command typed out and still be able to press CTRL+L to clear the screen and keep the command typed out.
On my desktop:
df -h
to check disk usagehtop
to see resource usagell
list directory contentsI recently found btop and am trying to use that instead of htop.
looks up btop ooooo
I really like that
cd
command. :PA command is anything you execute in the shell.
cd
is just a built-in command
You’ll love
zoxide
then.deleted by creator
The command is ‘z’
deleted by creator
It’s in the official docs for zoxide, you are supposed to use the z alias, and many distros just set it up directly like that. I love doing
z notes
from wherever I am.That doesn’t require a separate package, especially one which uses eval on every new shell. And isn’t messing with my distros or personal aliases (and doesn’t introduce cargo-packaging).
Simply adding one to two (you get the gist) directories and a keybind for
cd ..
is more slick. There are cases where you might usepushd .
but even then other tooling should already cover your needs.It’s also so easy that you can temporarly append to
$CDPATH
for a specific session. But again, then a second pane or pushd is already available.Now downvote me, lemmy.
You have to enable it in your shell config. For bash it’s
eval "$(zoxide init bash)"
That will give you the
z
command.https://github.com/ajeetdsouza/zoxide?tab=readme-ov-file#installation
On arch the command is just
z
When you set it up you tell it which command you want. Default is “cdi” but I changed it to “cd” immediately.
rsync
I use it to backup important work to an external drive.
sudo pacman -Syu
The reason I did it like this is because:
- I didn’t know yay could invoke pacman
- I didn’t want yay “upgrading” my pacman packages with AUR packages.
But I was just misunderstanding yay. As another comment said before you, one can just run yay without any arguments and it accomplishes the same thing.
Yay doesn’t replace normal packages with AUR packages. Btw It’s not just an AUR helper, it’s a wrapper for Pacman with AUR support built-in. Check out paru btw, it’s a more modern version of yay that basically works the same way: https://github.com/Morganamilo/paru
You can just run
yay
with no arguments and it does exactly what your update script does.
Ctrl-r with https://github.com/atuinsh/atuin is amazing. Never forget a command you used ever again.
I trigger it with the up arrow.
flac -t *
ls -al
Another
ls
alias I’m a fan of isls -latr
which I alias tolt
. It gives you a time sorted directory listing with the most recent next to your cursor (helpful for large directories).You might like
eza
even more!No,
eza
is one of those modern Rust replacement programs. It replacesls
.There’s a whole bunch of cool modern replacements. Here’s a handy list: altbox.dev
I personally use
bat
andrg
all the time, and find them much more suitable for everyday tasks.Edit: And to clarify, I didn’t create either list, they’re just ones I’d bookmarked at some point.
Even better than
rg
isrga
. Indeed, you have a fine list.The mobile site doesn’t have the list. I was so confused.
Ew, sorry. This list is similar and more accessible:
No, it’s like an ls replacement: https://github.com/eza-community/eza
It’s pretty easy. You either get it from Cargo (the Rust package manager) or add a custom repo to apt.
Cargo is the easier and safer option:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh && cargo install eza
Custom apt repo:
sudo apt update sudo apt install -y gpg sudo mkdir -p /etc/apt/keyrings wget -qO- https://raw.githubusercontent.com/eza-community/eza/main/deb.asc | sudo gpg --dearmor -o /etc/apt/keyrings/gierens.gpg echo "deb [signed-by=/etc/apt/keyrings/gierens.gpg] http://deb.gierens.de stable main" | sudo tee /etc/apt/sources.list.d/gierens.list sudo chmod 644 /etc/apt/keyrings/gierens.gpg /etc/apt/sources.list.d/gierens.list sudo apt update sudo apt install -y eza
In my opinion though, you should also try lsd. It’s even better than eza. You can also get it from Cargo, just a simple
cargo install lsd
.
A lot of distros include a .bashrc with common
ls
aliases commented out, just waiting for you to activate them if you like.
ll
df -h
du -sch
Ctrl+r
ll
Is an alias for
ls -al
yea?
I set mine to
ls -lAh
I have it as
ls -alFh
After using too much WINE, I type
pwd
,whoami
Make me a sandwich.
LambdaRX is not in the sudoers file. This incident will be reported
Eh, guess I won’t get anything for christmas.
less
,watch