Really simple terminal question: is there a way to "time" a compression test with 7z?
I'm not looking for anything fancy here, I suppose I could record every output in the bash terminal using a combination of script and tee, but I don't believe that records timestamps of every output? I'm looking for an implementation of this in the future because it would be great to store logs (and timestamps) from the terminal output.
In the meantime, here's what I've come up: Code:
date && 7z a litecoin-archive .litecoin/ -m0=LZMA2 -mx=7 && date Thoughts? |
Quote:
Code:
time 7z a litecoin-archive .litecoin/ -m0=LZMA2 -mx=7 |
not quite following... does time provide the needful ?
|
Quote:
|
Maybe not. I was answering the question in the title. Not entirely sure what is being asked for. Seems to be two questions?
OP, are you asking for a way to time a command OR log a start/end timestamp for a command? |
Quote:
|
I found a pretty cool article that auto-adds the current date/time to every prompt: https://www.blackmoreops.com/2016/10...erminal-linux/
This would also display the time between prompts.:cool: |
Just fyi, here's 2 ways
Code:
time ls |
Btw just a passing curiosity, "time" isn't going to substantially-negatively affect the performance of a cpu benchmark like this right? If the cpu is already being pegged at ~100% on both cores for the duration of the compression test, would tracking "cpu seconds" (user and sys time) use minimal resources?
|
Yet another thing worth mentioning if anyone's keeping track here, my distro's terminal emulator, "mate-terminal" has a default scrollback of 512 lines. That's an issue if you want to track a non-piped output of a lengthy process (like indeed compressing blockchain app data using 7z) in a default terminal window size because the initial output will get cut off and be lost. In the profile preferences in your terminal, there's an option for "unlimited" scrollback so I've set this from now on. 512 lines seems a bit conservative to me.
Ideally in the future I would be looking around for an emulator that has the ability to log and timestamp every line of output by default (not just on the prompts as my previous link explains. Here's an expounded article on how to export the timestamps on every prompt viewable in "history" by modifying the .bashrc file.) |
All times are GMT -5. The time now is 10:44 PM. |