Sponsored Content
Top Forums Shell Programming and Scripting Tail 86000 lines from 1.2 million line file? Post 302370221 by tip78 on Tuesday 10th of November 2009 07:53:53 PM
Old 11-10-2009
but u said:
Quote:
and this magic number will only be in the log once.
so there 86000 different magic numbers?
tip78
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to tail last 500 lines and vi them?

I have a very large log file and it speed up scrolling. so I want to tail last 500 lies and see using vi editor. tail -n 500 large_file | small_file | vi {}; this won't work. I'm very novice on Unix. TIA. (2 Replies)
Discussion started by: kang
2 Replies

2. UNIX for Dummies Questions & Answers

Display lines 30 to 40 of a text file using head and/or tail commands

Assume that the text file contains over 40 lines. How do you do this?!?!? (5 Replies)
Discussion started by: phunkypants
5 Replies

3. Shell Programming and Scripting

Matching 10 Million file records with 10 Million in other file

Dear All, I have two files both containing 10 Million records each separated by comma(csv fmt). One file is input.txt other is status.txt. Input.txt-> contains fields with one unique id field (primary key we can say) Status.txt -> contains two fields only:1. unique id and 2. status ... (8 Replies)
Discussion started by: vguleria
8 Replies

4. Shell Programming and Scripting

find numeric duplicates from 300 million lines....

these are numeric ids.. 222932017099186177 222932014385467392 222932017371820032 222932017409556480 I have text file having 300 millions of line as shown above. I want to find duplicates from this file. Please suggest the quicker way.. sort | uniq -d will... (3 Replies)
Discussion started by: pamu
3 Replies

5. UNIX for Advanced & Expert Users

SQL script with 86000 lines: new files with only 10000 lines (per file)

Hi this is my SQL script $ wc -l insert_into_customers.sql 85601 insert_into_customers.sqlI wish to cut this file into 9 files each 10000 lines (the last one less) $ wc -l insert_into_customers_00*.sql 10000 insert_into_customers_001.sql 10000 insert_into_customers_002.sql ... (1 Reply)
Discussion started by: slashdotweenie
1 Replies

6. UNIX for Dummies Questions & Answers

Help with changing header of tsv with 30 million lines

Hi My 30 million line file has a header chr start end strand ref_context repeat_masked s1_smpl_context s1_c_count s1_ct_count s1_non_ct_count s1_m% s1_score s1_snp s1_indels s2_smpl_context s2_c_count s2_ct_count s2_non_ct_count s2_m% s2_score s2_snp s2_indels ... (2 Replies)
Discussion started by: plumb_r
2 Replies

7. Shell Programming and Scripting

How to process only new line of tail -f command from live log file?

Hi, I want to read a live log file line by line and considering those line which are newly added to file Below code I am using, which read line but as soon as it read new line from log file its starts processing from very first line of file. tail -F /logs/COMMON-ERROR.log | while read... (11 Replies)
Discussion started by: ketanraut
11 Replies

8. Shell Programming and Scripting

Need a program that read a file line by line and prints out lines 1, 2 & 3 after an empty line...

Hello, I need a program that read a file line by line and prints out lines 1, 2 & 3 after an empty line... An example of entries in the file would be: SRVXPAPI001 ERRO JUN24 07:28:34 1775 REASON= 0000, PROCID= #E506 #1065: TPCIPPR, INDEX= 003F ... (8 Replies)
Discussion started by: Ferocci
8 Replies

9. Shell Programming and Scripting

Find all lines in file such that each word on that line appears in at least n lines of the file

I have a file where every line includes four expressions with a caret in the middle (plus some other "words" or fields, always separated by spaces). I would like to extract from this file, all those lines such that each of the four expressions containing a caret appears in at least four different... (9 Replies)
Discussion started by: uncleMonty
9 Replies

10. Homework & Coursework Questions

How to display certain line of file only using head or tail in 1 command?

First month learning about the Linux terminal and it has been a challenge yet fun so far. We're learning by using a gameshell. I'm trying to display a certain line ( only allowed 1 command ) from a file only using the head or tail. I'm pretty about this answer: head -23 history.txt | tail -1... (1 Reply)
Discussion started by: forzatekk
1 Replies
TAIL(1) 						      General Commands Manual							   TAIL(1)

NAME
tail - deliver the last part of a file SYNOPSIS
tail [ +-number[lbc][rf] ] [ file ] tail [ -fr ] [ -n nlines ] [ -c ncharacters ] [ file ] DESCRIPTION
Tail copies the named file to the standard output beginning at a designated place. If no file is named, the standard input is copied. Copying begins at position +number measured from the beginning, or -number from the end of the input. Number is counted in lines, 1K blocks or characters, according to the appended flag or Default is -10l (ten ell). The further flag causes tail to print lines from the end of the file in reverse order; (follow) causes tail, after printing to the end, to keep watch and print further data as it appears. The second syntax is that promulgated by POSIX, where the numbers rather than the options are signed. EXAMPLES
tail file Print the last 10 lines of a file. tail +0f file Print a file, and continue to watch data accumulate as it grows. sed 10q file Print the first 10 lines of a file. SOURCE
/sys/src/cmd/tail.c BUGS
Tails relative to the end of the file are treasured up in a buffer, and thus are limited in length. According to custom, option +number counts lines from 1, and counts blocks and characters from 0. TAIL(1)
All times are GMT -4. The time now is 04:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy