If you’re working in linux you will be introduced to writing shell scripts at some point. When you do, you’ll become very familiar with the echo.
If you open your terminal, and run an echo command it’ll literally echo whatever you put after the echo:
$ echo "Hello World" Hello World
Continue reading “How do you add color or bold the echo outputs in a shell script?”
Sometimes you need to compress an entire directory, but sometimes you want to ignore specific file types.
Here is a basic command that you can use to remove specific file types before you compress it. In this example we use the find command to look for, and ignore, all image file types. That then gets piped into the tar command:
Continue reading “Tar (Compress) a Directory without Images via Terminal”
I was working on one of my servers when I realized that I had done a bone-head mistake. I left the root password blank in MySQl.
It was not as easy as I thought to fix the problem. There were a couple of things I didn’t account for, specifically that when you’re initially setting up MySQL on Ubuntu and don’t provide a password to the root user, it will use the auth_socket plugin. That plugin doesn’t care and doesn’t need a password. It just checks if the user is connecting using a UNIX socket and then compares the username.
Continue reading “Setting Root Password on MySql when it’s Empty”
This post will walk you through the process of showing and updating a MySQL database via terminal.
We’ll use a WordPress installation because it has an established database schema. The principles apply to any database.
Continue reading “How do you show and update a MySQL database in a linux terminal?”