Three Linux Commands You Can't Live Without

Hey there! I'm currently working on a CLI tool to deploy WordPress apps to DigitalOcean. Check it out! It's free and open source.

Okay, we’re not going to talk about the shutdown, yum, etc. commands, though THEY are probably the ones that nobody can live without. I’m talking about the web here, remember? And we all know that not everybody owns a VPS, a VDS or a dedicated server. Virtual hosting plans are quite cheap today, and most of them are tuned to provide you with SSH access and basic privileges (although I DO highly recommend you get yourself a VPS, it’s not much more expensive than virtual hosting and I’m sure it’s worthed). These linux commands are extremely helpful when doing backup or moving from one server to another.

1. Create a compressed archive of the current directory:

tar -cvzf backup.tar.gz ./*

2. Create a compressed archive of a MySQL database dump:

mysqldump -u username -p password -h host -P port databasename | gzip -c > mysql.sql.gz

3. Get directory contents from a remote FTP server:

wget -r*

Hope that helped ;)

About the author

Konstantin Kovshenin

WordPress Core Contributor, ex-Automattician, public speaker and consultant, enjoying life in Moscow. I blog about tech, WordPress and DevOps.