Home » 2021 » September

How to Set/Change the Timezone in Linux

Linux set timezone

This simple tutorial will show you how to view, set, or update the timezone on your Linux system. You may also want to check out our article on changing the date/time in Linux. Find out the Current Timezone Before you change the timezone, it’s worth checking what it’s currently set to – it may already be correct! The following command will display information about the time and timezone as it is currently set on your system: timedatectl The returned information will look something like this: … Read more

Home » 2021 » September

Guide to Renaming Multiple Files in Linux

Linux rename multiple files

This guide will show you how to rename multiple files in Linux – renaming files sequentially, changing the extension, adding the date, and other renaming tasks. We’ve already covered moving and renaming files and directories using the mv command. However, renaming multiple files at once is a bit more complex. While it can be done with the mv command, some tools are built specifically for the task. Read on to find out what those tools are and how they can be used. Each tool has differences in how the renaming … Read more

Home » 2021 » September

Converting Variable Types in Python, Howto, With Examples

Python Type Conversion

This article will show you how to use Python’s built-in variable conversion functions, with examples. A variable’s type determines what kind of data it can store and what can be done with it. For example, string typed variables contain sequences of characters that can be joined and split (think words and sentences). In contrast, numeric typed variables contain numeric values intended to be used in calculations. Being able to convert a variable’s type allows data to be used in different ways. Converting a Variable to a … Read more

Home » 2021 » September

Print an Array in PHP using print_r and var_dump, With Examples

PHP Print Array

This article will show you several methods on how to print an array in PHP, with some examples. Arrays in PHP can be processed using foreach loops to interact with each element in the array. This article focuses on directly printing an array in full rather than each element individually. Using echo to Print an Array (It Won’t Work) You might think that you can just use the echo statement to print an array in PHP – this is not the case, as seen below: <?php // Define an … Read more

Categories PHP

Home » 2021 » September

Linux clear Command and Clearing Shell/Terminal Screen

Linux clear Command

This article will show you how to use the Linux clear command to clear the terminal screen. Quick and easy! Clearing the Terminal/Shell Screen If you’ve been executing a bunch of commands from your Linux terminal, things can start to look a bit cluttered. It would help if you could clear the screen of previous output and commands and have a fresh start. That’s what the clear command is for. clear Command Syntax Here’s the syntax for the clear command: clear Pretty simple. There are a couple of options to change … Read more

Home » 2021 » September

Linux man Command and Man Pages [Explanation/Examples]

Linux man Command

This article describes the purpose and usage of the man command in Linux and other Unix-like operating systems. Linux is a highly modular operating system, consisting of the core operating system (the Linux Kernel) and a collection of software packages that add functionality to it. These packages are generally individually maintained. Thus, each computer system will have different packages depending on what the user requires their system to do (for example, a graphic designer will have some drawing tools installed, whereas someone writing a novel may instead … Read more

Home » 2021 » September

How to use the Linux locate Command, With Examples

Linux locate Command

Here’s another tool for your Linux file searching toolbox – the locate command. This explains how to use it. The locate command is specifically made for finding files and folders by their name. It’s easy to use and can search for files using patterns. This is helpful if you are looking for files with a specific type/file extension. Installing locate locate may not be installed by default on your system. To install on Debian/Ubuntu-based distributions, run: sudo apt install mlocate Or on Redhat/CentOS/Fedora: sudo yum install mlocate Linux locate Command Syntax The locate … Read more

Home » 2021 » September

How To View and Create Hidden Files in Linux

Linux hidden files

Hidden files are files that are, well, hidden. Here’s how to find and view them on Linux-based Operating Systems. Hidden Files? Hidden files are hidden from view by default unless otherwise specified. Why would you want some files to be hidden? Usually, they are configuration files. You don’t really need to see them during your day-to-day tasks; they’d just clutter things up and get in the way. Your home directory, which includes all of your user files, has several hidden files and folders in it. These include … Read more

Home » 2021 » September

Check Type of Variable in JavaScript with typeof [Examples]

JavaScript typeof Operator

This article will explain JavaScript variable types and how to find the type of a variable using the typeof operator. The typeof operator is quite similar to the instanceof operator – but they do not function the same way.  instanceof returns TRUE or FALSE when checking if a variable is of a certain type, whereas typeof returns the name of the type. What are Types? The type of a variable determines what it can or can’t do. It determines what value the variable may take and … Read more

Home » 2021 » September

How to Count Files in a Directory in Linux/Ubuntu

Linux Count Files in Directory

This tutorial will show you how to count the number of files/folders in a directory on Linux, both recursively and non-recursively. The wc Command The wc (word count) command counts lines and words. It’s useful here as we’ll use it to count the outputted lines from various tools which list the files in a directory or directories. The below examples will show you how to use the wc command to count files. If you want to know more about it, you can check out the full user manual by running: man … Read more