Using 'break' and 'continue' to exit loops in bash

Using 'break' and 'continue' to exit loops in bash

As nice as looping in Linux scripts can be, you might just want to interrupt it sometimes, and the break and continue commands can do this.

Using the Linux apropos command – even if you have to fix it first

Using the Linux apropos command – even if you have to fix it first

The apropos command can help you find commands or discover some you don't yet know, but if you get the response "nothing appropriate", it might need some help.

How to work on Linux with filenames that contain blanks

How to work on Linux with filenames that contain blanks

Filenames that contain blanks can add complexity to the commands you use to work with them. Fortunately, there are several handy ways to make that easier.

How to copy files to multiple locations on Linux

How to copy files to multiple locations on Linux

You can run a series of Linux commands to copy multiple files to a folder or copy a single file to multiple folders, but you can save time and trouble by using xargs, loops and scripts.

Checking exit codes in bash

Checking exit codes in bash

No matter what command you run when using bash, an exit code is returned and the code can tell you if your command was successful or you ran into a problem. Exit codes and error messages are related, but you have to ask to see an exit...

24 ways to check the status of files using if commands on Linux

24 ways to check the status of files using if commands on Linux

The Linux if command can help find types, permissions, and content of files, among many other things.

How to find files on Linux and make it easy to find them again

How to find files on Linux and make it easy to find them again

The cd command is easy to use, but adding a couple tricks to your toolbox can make moving around, finding, and remembering the locations of files and directories simpler.

The simplicity and complexity of using quotes on Linux

The simplicity and complexity of using quotes on Linux

Using single and double quotes on Linux is easy if you know a few essential rules.

Using the watch command on Linux

Using the watch command on Linux

The watch command allows you to rerun commands in a loop until you stop it or run into a condition that stops the looping for you. It can be very useful when you're waiting for something to change before you can move on to the next...

Using the yes command to automate responses

Using the yes command to automate responses

The Linux yes command allows you to automate responses to scripts and commands, but how it responds is up to you.

Repeating commands on Linux with or without changes

Repeating commands on Linux with or without changes

There are a lot of ways on Linux to make repeating commands easier than retyping them, and here's a nice collection of them.

Rocky Linux 9 arrives with Peridot

Rocky Linux 9 arrives with Peridot

New to Rocky Linux 9 is Peridot, a tool that makes it easy for anyone to replicate and extend Rocky Linux.

Using the eval command in Linux to run variables as commands

Using the eval command in Linux to run variables as commands

The eval command allows you to run the contents of variables as commands and can be very useful -- especially in scripts.

Finding files on Linux with the longest names

Finding files on Linux with the longest names

File names on Linux systems can be as long as 255 characters, and here's how to find the longest ones.

The Linux fold command breaks up text, drives loops

The Linux fold command breaks up text, drives loops

The Linux fold command can break long lines of text into pieces, but it can also be used to create arguments for looping in scripts.

Open-sourced tool speeds up Linux scripts via parallelization

Open-sourced tool speeds up Linux scripts via parallelization

The pa.sh tool finds sections of code that can run independently, then runs them in parallel to save time.

Counting the days on Linux

Counting the days on Linux

Linux marks time in the number of seconds since the start of the Linux epoch. Here's a script for using that information to figure how many days separate two dates expressed in traditional calendar notation.

Removing duplicate characters from a string on Linux with awk

Removing duplicate characters from a string on Linux with awk

A clever awk command can make it easy to remove duplicate characters from a string.

Using htop to check performance on Linux

Using htop to check performance on Linux

Spend some time checking out the htop tool for viewing processes and system performance and you might just find it extremely handy when you need it.

Connecting to your Linux system with your Android phone

Connecting to your Linux system with your Android phone

If you have an Android cell phone, you can install an app that allows you to connect to your Linux system and run commands in a terminal session.

Load More