Posts

How to print lines matching pattern or string ?

Image
Consider you have a file called dictionary.txt with a huge collection of words and you only want to view line containing the word "tux". To check each word line by line is a tedious task, instead we use the grep command.

Is there any reference or documentation for Linux commands?

Image
When you come across a new word and don't know what it means, you will start looking for its meaning in a dictionary. But what if you have  just heard about a new Linux command and have absolutely no idea what the command does? Where will you look for a reference or documentation to the command?

How to find location or path of a command

In our earlier posts we saw how to find the location of a file with locate command and find command. But how do we find the path of a command in Linux? For that purpose we use the following commands which whereis

How to compare two file ?

In Linux we can compare whether two files are the same or not using more than one command. They are cmp command diff command sdiff command

How to create links in linux?

Image
To create a link file we use the command ln in Linux. Using ln command we can create both hard link and symbolic (soft) link.

What are the different link files in linux ?

Image
A file in Unix/*nix environment consist of two part, a filename part and a data part.  File name is just a reference or a link to the data part. The data part is known as i-node and it is the i-node of a file which stores the information regarding the file like file permission, file location, file size etc... Usually a file's data is accessed by calling the filename. But there are methods by which same data can be accessed using several names. We call these methods Link. Links are divided into 2 types. They are

Linux File System

Image
Just imagine an office environment before the arrival of computers.  All the data connected with the office will be available in paper and kept in a file. In a big organization there will be thousands of file. It will be hard to keep track of all these files unless all the files are kept safely and well organized. This not only helps to track a file easily but also improves work efficiency of the place.  Now lets co-relate the scenario with a computer. Instead of paper files, in a Computer System