It looks like you're new here. If you want to get involved, click one of these buttons!
Anybody know how to format the output on the "time" command in Debian? I am only looking for the real output, not user or sys. I'm out of ideas and searching for the time command on Google is really hard to do.
you could always just grep it?
Francisco
I tried that, no dice.
time cat /testfile | grep real ^^^^^^^^ Doesn't work.
time cat /testfile | grep real
2>&1 | grep real
use full path perhaps?
~# type -a time time is a shell keyword time is /usr/bin/time
or use 2> while "copying" to file. edit: like what rds100 said.
/usr/bin/time -q -f "%e" cat /testfile > /dev/null
Make sure you use the full path to time, otherwise you'll get the shell built-in, which doesn't work the same.
LoL, I didn't have time installed apparently... even though it was showing me the real/user/sys output. Weird.
Installed it with apt-get and fixed it. Thanks all!
@KuJoe said: LoL, I didn't have time installed apparently... even though it was showing me the real/user/sys output. Weird.
Not so weird. Bash has a version of time built in, which doesn't offer the full set of features that the real version has.
@rds100 said: 2>&1 | grep real
FTW
Comments
you could always just grep it?
Francisco
I tried that, no dice.
time cat /testfile | grep real
^^^^^^^^ Doesn't work.
2>&1 | grep real
use full path perhaps?
or use 2> while "copying" to file.
edit: like what rds100 said.
/usr/bin/time -q -f "%e" cat /testfile > /dev/null
Make sure you use the full path to time, otherwise you'll get the shell built-in, which doesn't work the same.
LoL, I didn't have time installed apparently... even though it was showing me the real/user/sys output. Weird.
Installed it with apt-get and fixed it. Thanks all!
Not so weird. Bash has a version of time built in, which doesn't offer the full set of features that the real version has.
FTW