LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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, 03: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, 03:22 PM   #2
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,028
Blog Entries: 5

Rep: Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791
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, 03:24 PM   #3
caponewgp
LQ Newbie
 
Registered: Aug 2009
Posts: 14

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


Reply


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 03:57 PM
General Multi Head Monitor Question endfx Linux - Hardware 1 05-26-2006 02:39 PM
Fc4 Dual Head Question IrishTurkey Fedora 2 10-01-2005 10:47 PM
Dual Head, question before I install Linux Reefcrazed Linux - Hardware 2 06-22-2005 05:56 PM
Question (donno wot to head it as) identikal General 2 10-08-2003 12:37 PM


All times are GMT -5. The time now is 03:17 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration