Posts

Showing posts with the label basics

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.

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

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

what is an inode?

Image
In Unix/*nix every file has a data structure known as i-nodes (index nodes). Each i-node stores all the information regarding a file like File type File mode or permission Number of links User ID Group ID File size Time stamp File deletion time

How to remove a file in linux ?

rm is one of the basic commands used to remove a file in linux. rm can be used to remove a file, directory, device nodes, links and so on.The rm syntax is given below

Linux Basic Commands

Wi th my first  post I am adding some of the basic and most frequently used Linux commands . Most of th e commands mentioned here can be used in numerous methods. Detailed usage of each com mands will be the sub ject of my next posts.