The man pages are important reference pages for any Unix user. But their look and feel is very boring because it is just lines of text with some punctuations. In this article we will see how the different parts of the man pages can be coloured and highlighted. That will make it very easy to follow the instructions in the man pages.Using mostThe most command can be used to display the colour man pages but first we have to install it and then add to our bash profile so that it becomes available in the environment. The below command shows ... Read More
The HTML5 tag is used to draw graphics, animations, etc. using scripting. It is a new tag introduced in HTML5. To use images with HTML5 canvas, use the drawImage() method. This method draws the given image onto the canvas.You can try to run the following code to learn how to use images with HTML Canvas. Here, the image is a reference to an image or canvas object. x and y form the coordinate on the target canvas where our image should be placed.ExampleLive Demo function drawShape() { ... Read More
Sometimes a Unix command may run for a very long time without giving the final output or it make a processing giving partial output from time to time. In such scenario we will like to put a time frame within which either the command mast complete for the process should abort. This is achieved by using below options.Using timeout ToolThe Timeout tool forces a command tour abort if it cannot complete within a given time frame. Below is the syntax and example.Syntaxtimeout DURATION COMMAND [ARG]... Where Duration is the number seconds you want the command to run Before aborting ... Read More
Many times we need to search for a particular string which may be present in multiple files. In this article we'll see which commands to use to find all the files that contains a particular string or Word.Using grepIt is a powerful regular expression search tool. At a basic level , it will match an input string with the list of files that contain that string.Below is the syntax and the example.grep 'string' directory-path/*.* #Example grep 'config' hadoop-2.6.5/etc/hadoop/*.*Running the above code gives us the following result −hadoop-2.6.5/etc/hadoop/capacity-scheduler.xml: hadoop-2.6.5/etc/hadoop/core-site.xml: hadoop-2.6.5/etc/hadoop/hadoop-policy.xml: hadoop-2.6.5/etc/hadoop/hdfs-site.xml: hadoop-2.6.5/etc/hadoop/httpfs-site.xml: hadoop-2.6.5/etc/hadoop/kms-acls.xml: hadoop-2.6.5/etc/hadoop/kms-site.xml: hadoop-2.6.5/etc/hadoop/mapred-site.xml.template: hadoop-2.6.5/etc/hadoop/ssl-client.xml.example: hadoop-2.6.5/etc/hadoop/ssl-server.xml.example: hadoop-2.6.5/etc/hadoop/yarn-site.xml:Using grep -rIn ... Read More
The Linux GUI based terminal window has many colours and font settings which can be enhanced as per the user choice. All these can be done using the shell commands and not just by clicking mouse buttons in the GUI component settings.Most of these settings are handled through variables whose value can be changed or assigned by commands. In this article we will see how to handle the terminal prompt settings in Ubuntu based systems.The PS1 VariableIt is a environment variable which controls the primary prompt string which is displayed when the shell is ready to read a command. There ... Read More
Using the characters like - , / or | and many other from the keyboard, we can create animation characters. These characters can be static as well as moving in the screen. All this involves programming using shell scripting. These scripts are bundled into libraries or packages which can be installed in the terminal. Below we will see the examples of these animations.A Running TrainThis package produces a train animation when run from the terminal. But first we install it and then simple type sl in the terminal.$ sudo apt-get install sl $ slRunning the above code gives us the ... Read More
A variable provides us with named storage that our programs can manipulate. Each variable in Java has a specific type, which determines the size and layout of the variable's memory; the range of values that can be stored within that memory; and the set of operations that can be applied to the variable.You must declare all variables before they can be used. Following is the basic form of a variable declaration − data type variable [ = value][, variable [ = value] ...] ;Here data type is one of Java's datatypes and variable is the name of the variable. To ... Read More
The hard disk in a computer is formatted with specific file system so that the operating system can read and write into it. For UNIX based systems we have various type of file systems. In this article we will see how to format a new partition in hard disk with ext4 file system.Available Filesystem typesFirst we see what are the different file systems available for the current operating system. The below command lists all those file systems.$ ls -1 /sbin/mkfs*Running the above code gives us the following result −/sbin/mkfs /sbin/mkfs.bfs /sbin/mkfs.cramfs /sbin/mkfs.ext2 /sbin/mkfs.ext3 /sbin/mkfs.ext4 /sbin/mkfs.ext4dev /sbin/mkfs.fat /sbin/mkfs.minix /sbin/mkfs.msdos /sbin/mkfs.ntfs /sbin/mkfs.vfatLook ... Read More
Following books are on top from popularity and content wise and are a good resource to learn java programming from beginner to advance level.
Along with various other keywords Java also provides this and super as special keywords which primarily used to represent current instance of a class and it's super class respectively. With this similarity both these keywords have significant differences between them which are listed as below - Sr. No.Keythissuper1Represent and Referencethis keyword mainly represents the current instance of a class.On other hand super keyword represents the current instance of a parent class.2Interaction with class constructorthis keyword used to call default constructor of the same class.super keyword used to call default constructor of the parent class.3Method accessibilitythis keyword used to access methods of ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP