Skip to content

Instantly share code, notes, and snippets.

@geoclaps
Created September 19, 2018 14:42
Show Gist options
  • Save geoclaps/df023903fce95ad2ad21cca3df81b4d9 to your computer and use it in GitHub Desktop.
Save geoclaps/df023903fce95ad2ad21cca3df81b4d9 to your computer and use it in GitHub Desktop.
Handy Linux commands (basic)
#creating ZIP file from folder
zip -r filename.zip sourcefolder
#creating ZIP file from folder and for example exclude .git files
zip -r filename.zip sourcefolder -x *.git*
#Change rights of files/folders recursively#
sudo chown -R user:group directory
#Apache restart#
service apache2 reload
#Apache config test#
apache2ctl configtest
#Close shell#
exit
#Switch user#
su – username
na inloggen 'exit' om terug naar eerdere user te gaan
#Start Vi#
vi
#Start Crontab#
crontab -e (als user!)
Optie 4
"do" om regels te verwijderen
"i" om in te voegen
"ESC" om uit bewerkmodus te gaan
Sluit Crontab af door op ":" te drukken en daarna "wq" + [enter] om af te sluiten
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment