Reputation: 39
I have text BGP RIP file and its in GBs and i am not able to open in my system and i need to analyze the different parameters such as IP and its pool .
Is there any command that i can save initial logs into another file.
such like
head -5 routes
which will display the initial 5 lines but i like to save that lines in to another file.
I tried this also
head -5 routes -> newfile
but not work
Upvotes: 0
Views: 866
Reputation: 122383
Just for completeness,
head -5 routes > newfile
will redirect standard output to newfile, newfile will be overwritten.
head -5 routes >> newfile
will redirect standard output to append to newfile, i.e, the previous content of newfile will still be there, new content will be appended.
Upvotes: 1
Reputation: 20232
Also take a look at the split command. It can break the file up into multiple smaller files for you.
Upvotes: 0
Reputation: 781058
The correct syntax to redirect output is:
head -5 routes > newfile
This should be in every Unix shell tutorial.
Upvotes: 0