How do I get the latest 100MB from a text log on Linux? Is there a tool for it, or could you point me on a script?
I have no programming experience on Shell Scripting, Perl or Python, and I don't want to install mono so I can write it in C#.
Thanks!!
Yvan Janssens
You can start Midnight Commander from the CLI with the mc command. After that you may select and open any file in "view mode" ( F3 ) or in "edit mode" ( F4 ). mc is much more efficient when opening and browsing large files than vim .
To look at the last few lines of a file, use the tail command. tail works the same way as head: type tail and the filename to see the last 10 lines of that file, or type tail -number filename to see the last number lines of the file.
You can try this :
tail -c 104857600 yourFile
or if you're more confortable:
tail -c $[1024*1024*100] yourFile
Resources :
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With