find YOUR_STARTING_DIRECTORY -type d -name "*nameOfFolder*" -print
pip show package-name
watch -n 2 commandNameHere
sed -i 's/old-text/new-text/g' input.txt
# Print every file name
for f in *; do echo "Processing $f file.."; done #can process only certain files as well with *.extension .e.g.-> for f in *.txt
#multple lines for several tasks is more readable
#E.g -> Iterate the files and if a .txt is found, remove it :
for f in *;do
if [ "${f: -4}" == ".txt" ]
then echo "removing txt file $f" && rm $f
fi
done
grep -r keyword *
find . -name "*.extension" -type f -delete
du -ahx / | sort -rh | head -20
files +100M
find / -xdev -type f -size +100M -exec ls -lha {} \; | sort -nk 5
tar --zstd -cf directory.tar.zst directory/
cat -n .zsh_history | sort -t ';' -uk2 | sort -nk1 | cut -f2- > .zhistory
Terminal Management with tmux
tmux new-session -n main # attach to main session tmux attach -t main
Ctrl + B -> arrow left right -> resize current view
Ctrl + B -> % -> divide view horizontally
Ctrl + B -> " -> divide vertically
Ctrl + B -> ; -> go to next window