Shell Scripts

Deploy to server with SSH

Upload files to the server by SSH conection with a shell command.

Bash command

This command will promopt the user password for the user shh connection

scp -r local/dist/. #username#@#SERVER_IP#:/var/www/vhosts/

Add sshpass command to add the password to the scp command

sshpass -p #PASSWORD# scp -r local/dist/. #USERNAME#@#SERVER_IP#:/var/www/vhosts/

Compress files with gzip

Compress the Javascript and CSS files on the server for optimize web speed. It will be compressed into new files with a .gz extension. [ read ]

List files with options

List files on the current path on vertical display with invislible files, file permisions, owner and size in human readable format. [ read ]