The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Script that extract some lines from a file lookin into another heartwork Shell Programming and Scripting 7 01-25-2008 06:57 AM
Extract lines from a file automatically. Please a Help alexcol Shell Programming and Scripting 8 12-16-2006 05:25 PM
How to extract a sequence of n lines from a file 0ktalmagik Shell Programming and Scripting 4 06-29-2006 11:24 PM
how to extract a range of lines from a file beilstwh Shell Programming and Scripting 5 07-09-2004 08:20 AM
extract specific lines from file apalex UNIX for Dummies Questions & Answers 2 05-15-2001 09:57 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-23-2005
kingkong kingkong is offline
Registered User
  
 

Join Date: Sep 2005
Posts: 18
How to extract many lines from a file, typically the 1000 last

Hello!

Is it anyone who might know how to extract the n last lines from a file, typically the 1000 last? Until know I have used sed -n np filename, but it takes each line separately, and is hence very time consuming.

Thank you in advance!
  #2 (permalink)  
Old 11-23-2005
vino's Avatar
vino vino is offline Forum Staff  
Supporter (in vino veritas)
  
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,796
man tail.

Code:
tail -1000 file.to.extract.from
  #3 (permalink)  
Old 11-23-2005
ashterix ashterix is offline
Registered User
  
 

Join Date: Nov 2005
Location: cyberjaya
Posts: 85
tail?

$ tail -1000 filename
  #4 (permalink)  
Old 11-23-2005
kingkong kingkong is offline
Registered User
  
 

Join Date: Sep 2005
Posts: 18
That was fast! Thank you a lot!!
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:42 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0