Skip to content

Instantly share code, notes, and snippets.

@silversonicaxel
Last active April 24, 2019 08:30
Show Gist options
  • Save silversonicaxel/d8340b82937240e26b7c to your computer and use it in GitHub Desktop.
Save silversonicaxel/d8340b82937240e26b7c to your computer and use it in GitHub Desktop.
UNIX SHELL COMMANDS #unix
// check size of a folder and its subfolders
du -h your_directory
//copy files from remote to local
// -r recursive
// -v verbose
scp -r [email protected]:/www/website/* /localdir
//copy files from local to remote
// -r recursive
// -v verbose
scp -r localdir/ [email protected]:/www/website/
// add key to keychains
ssh-add -K privatekey
//login to server throug key authentication
ssh - i privatekey [email protected]
// copy files through key authentication
scp -i privatekey -r localdir/ [email protected]:/var/www/website/
// configuration test on root document on webserver
service httpd configtest
// restart conditional of httpd service
service httpd condrestart
// restart of varnish service
service varnish restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment