RSS Subscription
Linux Howtos & Tutorials

Enter your email:

Delivered by


NOTE:New tutorials are from LinuxCareer.com

Poll

Do you own or wish to have iPhone?
 


Linux eBooks FREE Download
A guide to programming Linux kernel modules
Introduction to Linux - A Hands on Guide
A Newbie's Getting Started Guide to Linux

Linux from Scratch - Create Your Own Linux System - Free eBook

Linux: The Hacking Solution (v.3.0)

SQLite 3 with PHP Essential Training – Free Video Training Tutorials

This guide will introduce you to the world of GNU/Linux

The GNU/Linux Advanced Administration

A Complete Beginner's Manual for Ubuntu 10.04 (Lucid Lynx)

Advanced Bash-Scripting Guide

Set up, maintain, and secure a small office email server

Partner Linux Sites:
How-To.LinuxCareer.com
Jobs.LinuxCareer.com
TuxMachines
Monsterb
LinuxBloggers
AdamsInfo
LinuxScrew
All For Linux

Look at the first 3 lines of a file

Question:
What command could you use to look at the first 3 lines of a file named "grades.report" if you had such a file? What command would you use to see the last 2 lines?

Answer:

head command without any options will return first 10 lines of any given text file supplied as an argument. However, using -20 option will return first 20 lines. Therefore,

head -3 grades.report 

returns first 3 lines and

tail -3 grades.report

returns last 3 lines of a file grades.report.

Linux questions and answers

Share this linux post:

Submit Look at the first 3 lines of a file in Delicious Submit Look at the first 3 lines of a file in Digg Submit Look at the first 3 lines of a file in FaceBook Submit Look at the first 3 lines of a file in Google Bookmarks Submit Look at the first 3 lines of a file in Stumbleupon Submit Look at the first 3 lines of a file in Technorati Submit Look at the first 3 lines of a file in Twitter
 
Comments for this page are closed !!!
Please visit our new Linux Forum for additional help or discussion.


Linux eBooks FREE Download