I'm trying to extract the last 1MB of a 1GB log file on a mac. When I use
split -b 1m
it creates a lot of files. Is there a better way doing it?
Here is the command, if you haven't found it yet.
tail -c 1048576 file.log > last1mb.log
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