LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-20-2006, 05:57 AM   #1
newbie_mel
LQ Newbie
 
Registered: Mar 2006
Posts: 4

Rep: Reputation: 0
tail +40 /etc/FILENAME


Hi everyone
i'm very confused
i understand how tail -5 /etc/FILENAME works.
but i do not understand how tail +40 /etc/FILENAME works.
what does this do to the text file? im so confused. like negative vs positive?
 
Old 03-20-2006, 06:25 AM   #2
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
On my distro, using a plus ( +2 ) instead of ( -n+2 ) pops an error.
From the man pages....
Quote:
If the first character of N (the number of bytes or lines) is a ‘+’,
print beginning with the Nth item from the start of each file, other-
wise, print the last N items in the file.
For example:

cat file.txt
one
two
three
four
five

This prints the last two lines:

tail -n2 file.txt
four
five

This starts at line two:

tail -n+2 file.txt
two
three
four
five
 
  


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
change uploaded files from filename.avi to filename.avi.html like www.rapidshare.de latheesan Linux - Newbie 3 06-16-2005 04:33 AM
Coloured tail??? bram2000 Linux - Software 1 01-28-2005 11:42 AM
filename- and filename~ files? slinky2004 Linux - Newbie 5 10-17-2004 10:32 PM
tail -f dcoder Programming 8 09-01-2003 08:41 PM
how unsecure is tail -f WeNdeL Linux - Security 6 03-06-2003 03:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:23 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
Open Source Consulting | Domain Registration