BASH Articles

Write a bash/shell script to Finding and deleting duplicate files or directories

At one point, we had already talked about checking to see if strings inside of a file were unique and if we could sort them, but we haven't yet performed a similar operation on files. However, before diving in, let's make some assumptions about what constitutes a...

Write Linux bash/shell script to Crawl filesystem directories and printing a tree

We need an overview of the directory or system's file structure to view all files in a single place to examine those files. Here, we will write a bash script to travel directory recursively and check all files and directories to print them in a tree structure on...

How to Create a diff of two files and patching

In several situations or cases, we need to identify the differences between files and patch them, especially when updating configuration files, applications or patches, etc. So, when we start thinking about our day-to-day communication with the Linux operating system,...

Searching for files by name and/or extension in Linux Operating System

When we have many files available for viewing, sometimes we need to find a file among many without using the GUI searching tools or provide a better set of granular filters to reduce returned results.  We can use few commands to search a file on the command...