Useful Commands

A place for me to keep useful linux commands.
Useful Commands

Add an existing user to a group in Debian

sudo usermod -aG examplegroup exampleusername

Rename a Gcloud instance

gcloud beta compute instances set-name oldname --new-name=newname

Colour Palette

Install php7.4 on Debian

sudo apt install php7.4-{fpm,sqlite,curl,bcmath,bz2,dom,intl,gd,mbstring,mysql,zip}

Install nvm and node.js on Debian

curl | bash
source ~/.profile 
nvm install 16.13.0

Magento 1 SQL db import

Table storage engine for 'catalog_product_relation' doesn't have this option


cat magento-db-dump.sql | grep '=FIXED'
sed -ie 's/ROW_FORMAT=FIXED//g' magento-db-dump.sql

Find MySQL / MariaDB my.cnf file

mysql --help | grep /my.cnf | xargs ls


Connection to closed by remote host.
fatal: The remote end hung up unexpectedly
git config --global http.postBuffer 157286400


Copy a folder excluding a subdirectory

rsync -av --progress sourcefolder /destinationfolder --exclude thefoldertoexclude
ecommerce conversion science

Get a free digital audit

See how I can help grow your ecommerce business - I will audit your website, PPC and digital marketing and provide a free report with actionable insights.
Prefer to book a meeting?