Advice for everyday Unix systems administration and some clever ways to approach more challenging problems.
There are a number of commands on Linux that can help you turn a series of lines of text into a single line. This article explains two of them and provides some scripts to make the job even easier.
The awk, gawk and sed commands can turn tedious work into quick fixes. Check out the ways these commands can help get work done smoothly and easily.
The hexedit command provides a way to edit binary files, but to view and save the content in a file for later analysis without editing, try the xxd command.
There's a lot to learn about image files on the command line, from verifying file format to finding out where and when photos were taken and maybe even getting an unusual view of what they look like.
To manage user accounts on Linux systems, you'll need to be familiar with some important files and commands.
The locale settings on Linux systems can sync dates and times with where you are in the world.
A few clever Linux commands can make it a lot easier to create, view and remove complex directory structures.
The ss command on Linux systems can provide extensive details on the sockets that provide communications between systems. This article describes ss and some of the many options available to you.
Linux provides a number of commands for examining network connections and sometimes creates new ones to expand functionality.
Linux provides commands for converting numbers from one base to another. Learn how to uses these commands and how to make the process easier with scripts and aliases.
There are many ways to loop through data on Linux using bash and many ways to generate the data to be looped through.
The zdiff and zcmp commands can see if Linux files differ and if so, how.
The highly compatible zip, unzip and zipcloak commands on Linux can help you create encrypted zip files and extract their contents as needed.
Linux provides a lot of useful commands for looking at users, their activity and their impact on the system.
The ac command can provide very useful summaries of how much time users spend logged into a Linux system. It gets its data from the wtmp file.
There are lots of sides to bash and much to know before you're likely to feel comfortable snuggling up to it. This post examines many aspects of this very popular shell and recommends further reading.
If you need to count how many of each character is included in a file or phrase, there are some handy commands you can string together to accomplish this along with scripts and aliases that can make the job easy.
The Linux aspell and enchant tools can both ID typos in text files and suggest replacements.
A tool called wikit provides an easy way to get information from Wikipedia without leaving the Linux command line.
Bash functions can group related commands in Linux and run them as frequently or infrequently as needed. They can also make scripts more readable by organizing commands by the roles they play.
Here are some of the more popular bash options to control how scripts work on Linux and how to list the available options, including seeing which ones are turned on.
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.
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.
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.
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.
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 code while erro....
The Linux if command can help find types, permissions, and content of files, among many other things.
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.
Using single and double quotes on Linux is easy if you know a few essential rules.
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 task.
The Linux yes command allows you to automate responses to scripts and commands, but how it responds is up to you.
There are a lot of ways on Linux to make repeating commands easier than retyping them, and here's a nice collection of them.
New to Rocky Linux 9 is Peridot, a tool that makes it easy for anyone to replicate and extend Rocky Linux.
The eval command allows you to run the contents of variables as commands and can be very useful -- especially in scripts.
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 can break long lines of text into pieces, but it can also be used to create arguments for looping in scripts.
The pa.sh tool finds sections of code that can run independently, then runs them in parallel to save time.
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.
A clever awk command can make it easy to remove duplicate characters from a string.
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.
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.
The script described here can change Linux systems' IP addresses from dynamic to static with much less manual work.
There are many ways to concatenate strings when you're using bash and += might just surprise you!
Linux provides a nice selection of commands for pulling substrings from text, but each has its own way of working.
Here's an introduction to running a Linux terminal inside a browser and some of the tools available to you.
strace and ltrace provide a flood of information about system and library calls being made by Linux processes, and sorting through it all can help discover the cause of problems.
Figuring out Wordle can be a lot of fun, but if it gets too frustrating, this Linux bash script can be your friend. Enjoy taking a look at how the cheating process works.
The whereis, whatis and which commands can provide information on Linux commands, but in spite of names that appear related, they provide very different answers.
Need to perform a long series of calculations? Let's look at a cool trick for making it easier.
Linux awk and uniq commands offer options for cutting out duplicate lines from Linux files.