![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| 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 !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| read list of filenames from text file, archive, and remove | fxvisions | Shell Programming and Scripting | 5 | 03-20-2007 06:56 PM |
| how to remove ^M from windows text file in unix | pragy1999 | Shell Programming and Scripting | 1 | 04-13-2006 07:04 AM |
| Remove header(first line) and trailer(last line) in ANY given file | madhunk | Shell Programming and Scripting | 2 | 03-13-2006 12:36 PM |
| Insert a line as the first line into a very huge file | shriek | UNIX for Advanced & Expert Users | 3 | 03-08-2005 10:22 PM |
| Huge (repeated Entry) text files | axl | SUN Solaris | 4 | 07-16-2004 04:05 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
i need help..!!!!
i have one big text file estimate data file size 50 - 100GB with 70 Mega Rows. on OS SUN Solaris version 8 How i can remove first line of the text file. Please suggest me for solutions. Thank you very much in advance |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
i tried to use :
$ head -1 bigfile.txt > bigfile2.txt $ But line 1 of bigfile.txt don't removed from bigfile.txt. It's just copy first line from bigfile.txt to bigfile2.txt Only. T_T |
|
#3
|
|||
|
|||
|
Personally I would write a small C program that would
1. find the length of the first line 2. do repetative read/writes to shuffle the data up 3. use ftruncate to remove the length from the end of the file However I would also recommend you back this file up. If you know how many lines there actually are.... Code:
wc -l <bigfile.txt Code:
tail -69 <bigfile.txt >bigfile2.txt |
|
#4
|
||||
|
||||
|
I would try:
sed 1d < bigfile.txt >bigfile2.txt |
|
#5
|
|||
|
|||
|
Thank you very much krab. ^^
i can solved it ^^ |
|
#6
|
|||
|
|||
|
Quote:
cat filename | grep -v 'pattern' > file_temp mv file_temp > filename |
|||
| Google The UNIX and Linux Forums |