Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


How do I show real time online from time output in Debian?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

How do I show real time online from time output in Debian?

KuJoeKuJoe Member, Host Rep
edited February 2012 in Help

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.

Comments

  • FranciscoFrancisco Top Host, Host Rep, Veteran

    you could always just grep it?

    Francisco

  • KuJoeKuJoe Member, Host Rep

    I tried that, no dice. :(

    time cat /testfile | grep real
    ^^^^^^^^ Doesn't work.

  • 2>&1 | grep real

  • Mon5t3rMon5t3r Member
    edited February 2012

    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.

  • KuJoeKuJoe Member, Host Rep

    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

Sign In or Register to comment.