Terminal command nice to know

mkdir (create new folder)
rmdir (delete folder)
rm -rf folder (delete folder with content)
rm -r (delete file)
touch index.html (create document)
open index.html (open document)
open -a "Visual Studio Code" index.html (open file in specific app)
cd .. (go back)
ls (list)
ls -las (better list)
la -las (also better list)
pwd (present directory)
open . (open folder in Finder)
mv oldname.jpg newname.jpg (change name on file or folder)
man xxxx (shows a manual of a command)
Command + K (clean the terminal)
Command + Z (gets back)

chmod 700 filename - Sometimes you have to be superuser (SU) - Set all Rights
grep -r wc_checkout_params (Search for something)
find . -type f -exec chmod 644 {} \; - give rights
find . -type d -exec chmod 755 {} \; - give rights

du -sh */ (check the folder size, one level)
du . -h --max-depth=1 (check the folder size)
df (show server size)


Remove everything on the computer in terminal:
sudo rm -rf /

Leave a Reply

Your email address will not be published. Required fields are marked *