modern commands!
A note on https://github.com/ibraheemdev/modern-unix
zoxide (recommend!)
To replace cd
Install
curl -sS https://webinstall.dev/zoxide | bash
# add in ~/.bashrc
eval "$(zoxide init bash)"
# restart bashbash
Use
# cd <dir> but auto match
z <dir>
# interactive match
zi <dir>bash
mcfly (recommend!)
To replace Ctrl + R.
Install:
mkdir mcfly
cd mcfly
wget -c https://github.com/cantino/mcfly/releases/download/v0.5.6/mcfly-v0.5.6-x86_64-unknown-linux-gnu.tar.gz
tar -zxvf mcfly-v0.5.6-x86_64-unknown-linux-gnu.tar.gz
cp mcfly ~/bin/ # move to somewhere in PATH
# add to ~/.bashrc
eval "$(mcfly init bash)"bash
Use:
# initialize only once
mcfly # it takes about one minute to read in history
<Ctrl+R> # evoke it.bash
ag (recommend!)
To replace grep -rnw -e "pattern"
Install:
sudo apt install silversearcher-agbash
Use:
ag "pattern"
ag -i "pattern" # ignorecase
ag -w "pattern" # whole wordbash
duf (recommend!)
To replace df
Install:
sudo snap install duf-utilitybash
Use:
dufbash
dust (recommend!)
To replace du
Install:
mkdir dust
cd dust
wget -c https://github.com/bootandy/dust/releases/download/v0.6.0/dust-v0.6.0-x86_64-unknown-linux-gnu.tar.gz
tar -zxvf dust-v0.6.0-x86_64-unknown-linux-gnu.tar.gz
cd dust-v0.6.0-x86_64-unknown-linux-gnu
cp dust ~/bin/bash
Use:
dust
# limit depth == 1
dust -d 1bash
exa
To replace ls
Install
mkdir exa
cd exa
wget -c https://github.com/ogham/exa/releases/download/v0.10.1/exa-linux-x86_64-v0.10.1.zip
unzip exa-linux-x86_64-v0.10.1.zip
cp bin/exa ~/bin/bash
Use
exa
exa -l # ls -lrtha
exa -lT # ls directory trees.
bash
bat
To replace cat
Install
mkdir bat
cd bat
wget -c https://github.com/sharkdp/bat/releases/download/v0.18.1/bat-v0.18.1-x86_64-unknown-linux-gnu.tar.gz
tar -zxvf bat-v0.18.1-x86_64-unknown-linux-gnu.tar.gz
cd bat-v0.18.1-x86_64-unknown-linux-gnu
cp bat ~/bin/bash
Use
bat <file>bash
gdown
https://github.com/wkentaro/gdown
To download large files from google drive.