commands that i use often, but hard to remember lol
sudo fallocate -l 1G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
Replace 1G
with whatever big you want.
grep -rnw './' -e '<string>'
find . -type f -name "*.<ext>"
ssh -R 9000:localhost:22 user@remote
ssh -p 9000 user@localhost
screen -d -m -S <name> "<command>"
docker compose pull && docker compose down && docker compose up -d
tar -xvf file.tar
tar -xzvf file.tar.gz
tar -xjvf file.tar.bz2
-z
for .tar.gz
files-j
for .tar.bz2
filesNeeds unzip
to be installed.
unzip file.zip -d <destination>
java -Xmx1024M -Xms1024M -jar <jar> nogui