how to prompt for input from user in a linux shell script

shell script select command menu

When writing shell scripts, you will have scenarios you want to get input from the command line. And you would want to perform some specific action based on the user input. Programming a shell script to accept user input from the console is quite simple. We will see some examples of how you can do this in a bash script….

how to use wget to find broken links on your website

broken links detection with wget

As websites get larger and larger with ever-growing content, it could easily get to be a nightmare to maintain. It is true for any website. But this is especially true of a blog, a forum or any site with a constant influx of new content. Over time, content on the website can get outdated and removed. This could lead to…

how to chain commands in linux command line (with examples)

sort command with redirection

Sometimes you would want to run multiple commands in succession or simultaneously. This is usually useful when running processes or commands that is expected to run for a long period of time. This allows you to automate a process that include several commands that may or may not depend on the result of the previous command. Linux command chaining is the…

7 linux commands that will help you learn other linux commands

man rm command

One of the daunting task that most Linux beginners face is the sheer number of several different commands and utilities that are available. Some of these commands might seem to do the exact same things. Each of these commands have numerous command line options on top of it. Yes. having choices comes at a price. It is quite impractical to learn…

how to format an usb drive in fat16/fat32/ntfs from linux command line

fdisk listing of drive

One of the reasons of having to use an usb drive is to transfer files between different machines, usually with different operating systems. Unfortunately, there are still enough Windows machines out in the wild that reads only specific file systems in formats such as FAT32 or NTFS. This means you will need to format your USB drives in formats that is…

11 simple rsync examples that you can use to be more productive

rsync examples in linux

If you have been working with Linux for any amount of time, you must be familiar with the rsync command utility. rsync is a very powerful tool that allows you to synchronize files between two locations, even remote locations over the network. It is a very powerful file transfer tool with definite advantages over any other copy programs. The generic…

12 useful bash aliases that you can make you more productive in linux

bash aliases in linux

Aliases is one of the most useful features of Linux command shells. You probably end up using the same commands over and over on a daily basis. This is true if you use the command line for almost everything. You can use bash aliases (if you use bash) or shell aliases to make these every day tasks easier to execute. Most of…

how to show or display hidden files in linux

midnight commander files options

In Linux, as you should already know, there is the concept of hidden files and hidden folders. It is not exactly hidden in the literal sense, but all that means is that the file managers and file system utilities will not display these types of files by default. The hidden file concept is not a security feature and it does not…

how to schedule and run a command without cron in linux

while sleep job

In Linux and Unix systems, you can schedule any command or program to run at definite intervals (or at pre-defined times) using the job scheduler framework. The most popular job-scheduling utility is cron, and the jobs run are commonly referred to as the cron jobs. Sometimes, you want to run the job only for a small amount of time (or just for…

how to split a file into multiple files in linux

split files in linux

Quite often you encounter files, usually text files that are just too big to handle. Various file operations such as even opening these files in a text editor can eat into the memory of the machine making it sluggish. It also makes searching and other text processing inside the files even more time and resource consuming. A good example of…

how to show line numbers in gedit text editor

gedit line numbers linux

There are many graphical editors in Linux, many with specific features for text editing. GEdit and Kate are probably the most popular of these, mostly because they are tied to desktop environments such as Gnome and KDE respectively. There are several more that you could try such as Cream, JEdit, Kwrite and Scribes. Gedit has been quite popular because of…