cat Command in Linux/Bash – How to Use It, With Examples
The cat (concatenate) command in Linux/Bash is most commonly used to read the contents of a file. It outputs the contents of a given file. Here’s how to use it. cat concatenates files to standard...
View ArticleShow Privileges in MySQL/MariaDB using SHOW GRANTS, With Examples
This article will show you, with examples, how to show what database privileges users have in MySQL and MariaDB. List All Users To show the privileges for a user, you need to be able to query the...
View ArticleRecover Deleted Files in Ubuntu/Linux, With Examples
We’ve all been there (I’ve been there) – a file was deleted that shouldn’t have been. Here is how to attempt recovery on Ubuntu/Linux. with examples. Backup Your Files First up, keep backups of your...
View ArticleLinux diff – How to Show Differences and Make Patches, With Examples
The diff command is an easy way to compare files or directories from the Linux shell. This article will show you how to use it, with some examples of common usage. The diff command performs a...
View ArticleRestarting the Network in Ubuntu [Instructions/Example]
If you’ve recently updated your network configuration or just can’t get things to connect, you may need to restart the networking services on your Ubuntu System to get things back up and running....
View ArticlePHP Validator – Safely Checking Your PHP Code Syntax Quickly and Easily
This is a quick “now you know” article showing you how to validate your PHP code using PHP from the command line instead of using an online PHP validator. Online PHP Validators So, you’ve got some PHP...
View ArticleFind Large Files in Ubuntu/Linux (du/ncdu), With Examples
Running out of disk space? Here’s how to find large files in Ubuntu (and other Linux distributions) without any fuss using the du and ncdu commands. The du Command The du (Disk Usage) command does what...
View ArticleMerge Tables in MySQL (UNION/MERGE TABLES) – Tutorial
There are one of two things you might be looking for – merging two MySQL tables, or the MERGE TABLE syntax – this article explains both, with examples. Merging Tables in MySQL (Moving Data From One...
View ArticleWhat is $@ (Command Line Arguments) In Bash/Linux?
This article will explain what the $@ is in Bash and Bash/Shell scripting and how and why you might use it. The $@ variable is a special variable in Bash which holds the value of all of the command...
View ArticleUsing The isNaN() Function in JavaScript, With Examples
isNaN() is a JavaScript function that will tell you whether a value is equal to NaN – or Not a Number. It can be used to determine whether the result of a mathematical operation is valid or not. Here’s...
View ArticleArray Variables in Bash, How to Use, With Examples
We’ve covered using variables in Bash previously – this article will explain Bash array variables and provide some example usage. What is an Array An array is a type of variable that can hold multiple...
View ArticleArch Linux vs Ubuntu Linux – Which is To Choose?
This article will explain Linux Distributions, Ubuntu, and Arch Linux, and give you some information to help choose between them. Linux Distributions The Linux Kernel is the core of the Linux Operating...
View ArticleExiting Bash Scripts with the exit Command, With Examples
Bash/Shell scripts usually run sequentially until all of the code in the file has been executed. The exit command will exit the script before this based on conditions of your choosing. exit Command...
View ArticlePassing Variables by Reference in PHP, with Examples
This article will explain how to pass a PHP variable by reference and why you might want to do it – with some examples. What is a Variable? You probably already know this one. A variable stores a value...
View ArticleChecking Whether a String Contains a String in Python, With Examples
This article will show you how to check if a string contains another string in the Python programming language. PHP and Javascript both have similar functions included: PHP strpos Function: Check if a...
View ArticleUnix vs Linux – What’s the Difference?
Here’s a quick summary of Unix and Linux and what makes them different, and ways you can try them out. Different products, similar uses What is Unix? Unix was developed in the 1970s by Bell Labs as an...
View ArticleHow To Run a Python Script (Python 2/3)
This article will show you how to run both Python 2 and Python 3 scripts in Linux and find out what versions of Python are installed. Running a Script To run a Python 3 script: python3...
View ArticlePHP vs HTML – What’s The Difference? Which Should You Use?
This article will explain the difference between PHP and HTML and outline which you should use for your project (probably both – and I’ll explain why). If by the end of this article you’re still trying...
View ArticleMove Files With the mv Command in Linux, With Examples
This article will walk you through moving files in Linux with the mv command, with examples and tips on moving files safely. mv Syntax Moving files is done using the mv command, which has the following...
View ArticleCopy a Table in MySQL/MariaDB – How To, With Examples
This article will show you the BEST way to copy a table, with or without the data in it, in MySQL and MariaDB. Copying the Table with All Data in MySql The following code will copy a table including...
View Article