LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-12-2009, 02:17 PM   #1
caponewgp
LQ Newbie
 
Registered: Aug 2009
Posts: 14

Rep: Reputation: 0
Using Head command question


Alright I was wondering if I was trying to use the head command to view the first 100 lines of a file but the file only contains like 6 lines will it display the 6 lines I requested then 194 blank lines or just the original six that are in the file.

head -100 info.txt

Thanks again a head of time.
 
Old 08-12-2009, 02:22 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
That would be easy enough to test - just type it at command line. It only displays it so wouldn't hurt anything.

The answer is no - it will only display the number of lines it finds in the file.
 
Old 08-12-2009, 02:24 PM   #3
caponewgp
LQ Newbie
 
Registered: Aug 2009
Posts: 14

Original Poster
Rep: Reputation: 0
Wow thanks for the fast response.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Firefox on Slackware 10.2: '-remote' command fails on a dual-head system Gone Fishing Slackware 5 10-28-2006 02:57 PM
General Multi Head Monitor Question endfx Linux - Hardware 1 05-26-2006 01:39 PM
Fc4 Dual Head Question IrishTurkey Fedora 2 10-01-2005 09:47 PM
Dual Head, question before I install Linux Reefcrazed Linux - Hardware 2 06-22-2005 04:56 PM
Question (donno wot to head it as) identikal General 2 10-08-2003 11:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration