Have you ever seen a train running on Linux command line? Have you ever seen ‘Tom and Jerry’ on Linux command line? Well, working on Linux command line is not that serious always. There lies a fun factor too. Here in this space, we shall discuss the idiosyncrasies of Linux command line.
Assumption: Ubuntu Linux is used for all the examples in this article. The command line utilities described in this article may or may not be present by default on your Linux system.
(more…)
I have been a Linux command line addict for many years now. Though I use Ubuntu 12.04 these days but still I spend most of the time on command line. I like to do most of my tasks through command line only. While I am pretty happy with what all I am able to do through command line but still there are few tasks for which I have to use other (GUI based) applications. One of these tasks was taking a screen-shot. I have always used graphical applications for taking screen-shots on Linux. Honestly speaking I never thought that Linux command line can be used to take a screen shot until I encountered the scrot utility.
The scrot utility can be used to take screen-shots from command line. There are various options available with this command that make this utility equally powerful and flexible as its graphical peers. In this article we will discuss some important and useful features of scrot utility through practical examples.
(more…)
Generally, on any operating system, we say we have so many programs running. These running programs introduce the concept of processes. Let’s Define as to what is a process – A process is a program in execution.
Robert Love expresses his definition of a process in one of his books as :
The Process is one of the fundamental abstractions in Unix Operating Systems, the other fundamental abstraction being files
Linux is a multi-user and multi-tasking operating system(seemingly, discussed later in the article). A Linux process is a program in execution on a Linux system. Therefore, whenever a program is executed, a new process is created. A process also consumes resources like the file system, memory or other CPU resources. This gives rise to the need of process management in Linux.
(more…)
Have you ever been caught in a situation where, through command line, you had to backup or delete files that were created in a specified time period?
Have you ever got frustrated when your image viewer program mixed up your latest photographs with old photographs just because your camera messed up with the time stamps of the latest photographs at the time when they were taken?
Or, do you just want to play cool in front of your friends or peers by accessing a file or document even before it was created?
Well, if you have been through the above mentioned or similar situations and want to know how can we use a couple of easy command line utilities in Linux to solve these problems then it’s time for you to read on.
(more…)
Iproute2 (or Iproute) consists of a variety of utilities for controlling TCP / IP networking and traffic control in Linux. It is actively maintained and frequently updated, and now considered the preferred package for modern network technologies which includes important network tools such as ip and tc, used for IPv4 and IPv6 configuration and traffic control. It currently replaces the outdated Net-Tools package encompassing commands such as ifconfig, route, arp, etc, which are now known to be mostly inadequate as they provide limited features.
To give you an idea just how obsolete the Net-Tools package is, it should be noted the last verified update was back in April, 2001. A common view among many developers and users is that these former Net-Tools utilities should be deprecated, however, most Linux distros still include them as old habits are hard to break. It is suggested, now is the time to familiarize yourself with some of the most common commands of the newer, feature packed Iproute2 utilities package to be more current with the times.
(more…)
For a Linux user, fuser is an efficacious utility. It stands for file user and as it suggests, it tells us the processes which are using the file. In this article we will study when and how to use Linux fuser command through practical scenarios and examples. Since in Linux everything is a file, we shall see later in the article, how it is used for directories and sockets too.
(more…)
Hexdump is a Linux command that provides many options to dump file contents. It can dump file contents into formats such as hexadecimal, octal, ASCII, decimal. This command takes input either from a file or standard input. Hexdump is very helpful utility for debugging and verifying file contents written by any application program. In this article, we will first understand the basic usage of hexdump and then we will discuss some practical scenarios where hexdump command comes in really handy.
(more…)
It is said, that the biggest and toughest problem can be solved by breaking it down into smaller problems and then solving it. One of the technique based on similar lines is recursion. Recursion in simpler and theoretical terms is solving a problem by solving smaller problems of “same” form and using their results to compute the final result. We will delve into the mathematical and programmatic understandings, but prior to that, lets understand the abstract concept of recursion through an example.
Suppose there a volcano at a place in country A, which erupts in a set pattern which has been observed. That is, it has been observed that it erupts after twice the number of years of its previous eruption. As in, if last volcanic eruption was after 1024 years, then the next eruption will be after 2* 1024 = 2048 years. Now, we want to compute how many years have passed since the volcano is active?
(more…)
With the understanding of the ELF format, one gets to know about its sections, the headers, etc. However, apart from the theoretical concepts of ELF, how about if we can verify and understand the format in its actual machine language i.e. the way machine understands it. Yes, we have many tools out there which are provided by the open source community, like readelf, objdump, etc to strip off an ELF binary. However, in this article we shall be exploring the readelf command or tool in Linux.
(more…)
Swiss Army Knife of networking netcat is a versatile tool that is able to read and write data across TCP and UDP network . Combined with other tools and redirection it can be used in number of ways in your scripts. You will be surprised to see what you can accomplish with Linux netcat command.
(more…)