Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 08-12-2009, 02:17 PM   #1
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
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,943
Blog Entries: 14

Rep: Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161Reputation: 1161
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
LQ Newbie
Registered: Aug 2009
Posts: 14

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:12 AM.

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