linux

Viewing Linux Text Files




The head Command

The head command displays the beginning of a file.The format of the head command is:   head  filename



By default, you can only read the first ten lines of a file. You can change the number of lines displayed by specifying a number option.
eg:  head -20 filename

The above command would display the first 20 lines of a file named "filename"

The Tail Command

The tail command does the vice versa of Head command and it displays the bottom ten lines of the file by default in linux.
eg:  tail  filename

The more Command

The more command is used to view text in the terminal window one page or screen at a time. The [Space] bar moves forward one page and "Q" quits.

The less Command

The format of the less command is:
less  filename

less command alows single-line movement using the same navigation press the [Space] bar to go down one page, the "B" to go back one page, the directional "arrow" keys to move one line at a time, and "Q" to quit.

To search the output of a text file using less, press "/" and enter the keyword to search for within the file.

Free linux download resources are available.You can download it and can work out on the free linux operating system.

                           send to a friend                                            moby@mylinuxplanet.com      

Please free to mail your queries and feed back at moby@mylinuxplanet.com a free linux tutorial website


Linux Tutorials

About This Site

History of Linux

Open Source

File system terms

Linux File System

History of Shell

Opening a Shell Prompt

Shell Prompt Basics

Linux Shell Prompt

Linux Commands

Viewing Text Files From The Shell

Manipulating Information from Shell

Linux Help

Managing Linux Files

Multiple Commands Usage

Managing Linux Directories

Linux Directory Commands

Locating And Search Commands

Command History

Wildcard Characters

Creating a Linux User

Ownership And Permissions

File Compression

Virtual Console Logout & Shutdown

Running Background Process

Shell Prompt Keyshortcuts

Clearing And Resseting Terminal

Vi Editor

Shell Scripting

Installing and Removing Applications

Servers in Linux

Our Link Partners