Shell (Linux)
Delete a directory:
rm -r directory
Delete file:
rm FILETODELETE
New directory:
mkdir FOLDERNAME
Copy file:
cp SOURCE DEST
Copy folder:
cp -avr SOURCE DEST
Watch file:
less +F YOUR.LOG
Move/Rename folder:
mv OLD NEW
Download file:
curl -O URLHERE
Unzip:
unzip FILENAME.ZIP
Untar & Gzip:
tar -xzf FILENAME.TAR.GZ
Ungzip:
gzip -d FILENAME.GZ
Zip folder:
zip -er DESTINATION.ZIP FOLDER
Kill process:
kill -9 PROCESSID
Kill process on port:
kill $(lsof -t -i:PORT_HERE)
Find process:
ps -ef | grep PROCESS NAME
Process list:
ps aux
Root process list:
ps -u root
Check memory usage in megabytes:
free -m
List of ports in use:
sudo lsof -i -P -n
Last modified 4mo ago