Tag Archive: Man page



Command line terminals are an indispensable part of *IXs. We all need those sooner or later. Usually we want to open many terminals at a time to do various things in those but placing them in the same screen is bit chaotic. We have an utility on GNOME  desktop environment  known  as terminator that is able to create multiple terminals in same window. These  multiple terminals could be created by horizontally, verticallly or tab dividing the window. Screenshot of the same is shown below :

Multiple Terminals

To install it on Ubuntu, issue command  sudo apt­-get install terminator. To launch it  on ubuntu go to Applications -> Accessories -> Terminator . You can also type terminator in cli shell to launch it. If you want to install it manually then you can download it from their official page .

The basic key combinations are:

Ctrl+Shift+O for   the  horizontal division
Ctrl+Shift+E for the vertical division,
Ctrl+Shift+T for the  tab  division
Ctrl+Tab  to switch between the created terminals
Ctrl+Shift+q to quit terminator.

The terminator supports a hell lot of functionalities like grouping ,automatic logging,multiple searching etc. For more info about the terminator, access its man page through man terminator command.

Pages : Follow ankurtwi on Twitter      


Cat is one of the most well know commands of the Linux as well as of Unix systems. It’s mainly use to display the file contents of a small file on the terminal. But scope of the cat commands is not just limited to  display, We can use the cat command to create,append and even in the concatenation of the two files. In this post we will learn how to complete these jobs using the same cat command.

Display : As stated above we mostly use cat utility for the display purpose only. To display a file using cat use the following syntax without brackets “cat filename1 filename2…” . You can display single file as well as multiple files in one go. In case of multiple files, file2 will get display after the file1. Example – In the screenshot below we are displaying the contents of the test file using cat command.

Display Using Cat

You can use options like ‘-v’ , ‘-n’ etc to enrich the display. Look at the man pages for the options by typing man cat.

Create This is the best part about cat. You can even create your text files using this utility. Enter the cat command followed by the redirect output ‘>’ character and the filename. In short, something like this “cat > file” . When you press enter  the prompt vanishes. cat now waits to take the input from the user. Enter your text. Press [Ctrl-d] to signify the end of file character.The system will understand that no further text input will be made. The file is written and the prompt is returned. To verify you can use the                    cat file again.

Append : We can append a file by using append character “>>” utility along with the cat command.  Syntax for appending  is “cat >> file”. In this cat waits for the user to enter the input on to the terminal and then reads it. After reading it appends it into the file.

Append Your Files

Concatenate : Sometimes you need to concatenate two files especially if you are following the modular coding techniques. You can easily concatenate two files by using the redirecting output parameter ‘>’.  We can concatenate two files into the third file by following a syntax like “cat file1 file2 >file3″ . It will first write down the file1 and then file2 into the file3.

Scope of cat is not just limited to only these four functions. You can learn more about this utility using the web or by reading the man pages.

Pages : Follow ankurtwi on Twitter      


I am reading this book – “Unix concepts and applications” written by the great author “Sumitabha Das”. This book is very good to start from the basics. If you wanna buy it , you can purchase it from Buy Unix Concepts And Applications from Flipkart.com .

It is very difficult to remember each shell command, even experts get confused with them sometimes. There’s an inbuilt documentation called as Man pages in Unix/Linux which practically provides the documentation of every command. You just have to type “man command” (without Quotes). What man command does,it searches for the documentation of the given command and  display it on the shell through the pager program. Man documentation has been divided into several sections. As of present it is divided into 9 sections each having a collection of specific category. Sections are-

1. Executable programs or shell commands

2. System Calls

3. Library Calls

4. Special Files (Usually Found in /dev)

5.File Formats and Coventations

6. Games

7. Miscellaneous

8. System Admin Commands

9. Kernel Routines

Most of the commands are available in the section 1. When you call the man documentation such as   “man wc”  man will look for the documentation of the wc command in the sections starting from section number 1. As soon as it finds it, it will stop looking further and  will display the documentation of the wc from the section 1.  There are many commands which are available in the multiple sections of the man documentation. For example passwd command is available in both section 1 and section 4. To locate the documetation section wise you should type the section number as an argument. Ex- “man 4 passwd” . This will display the man page of passwd form the section 4 not from the section 1.

Pages : Follow ankurtwi on Twitter      

Follow

Get every new post delivered to your Inbox.

Join 69 other followers

%d bloggers like this: