Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8818283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:04:18+00:00 2026-06-14T05:04:18+00:00

Just a little question about timing programs on Linux: the time command allows to

  • 0

Just a little question about timing programs on Linux: the time command allows to
measure the execution time of a program:

[ed@lbox200 ~]$ time sleep 1

real    0m1.004s
user    0m0.000s
sys     0m0.004s

Which works fine. But if I try to redirect the output to a file, it fails.

[ed@lbox200 ~]$ time sleep 1 > time.txt

real    0m1.004s
user    0m0.001s
sys     0m0.004s

[ed@lbox200 ~]$ cat time.txt 
[ed@lbox200 ~]$ 

I know there are other implementations of time with the option -o to write a file but
my question is about the command without those options.

Any suggestions ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T05:04:19+00:00Added an answer on June 14, 2026 at 5:04 am

    Try

    { time sleep 1 ; } 2> time.txt
    

    which combines the STDERR of “time” and your command into time.txt

    Or use

    { time sleep 1 2> sleep.stderr ; } 2> time.txt
    

    which puts STDERR from “sleep” into the file “sleep.stderr” and only STDERR from “time” goes into “time.txt”

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

just need a little explanation please. I am referencing question here about listening to
I just have a little question about a query making me crazy. I'm working
I just have a little question about running Qt created apps on different operating
Just a little question for you... I'm currently trying to implement a role structure
i have a little question about the verbatim environment in latex..... my problem is
I got a little question about performance of a subquery / joining another table
Just a question about Azure. Yes, I know roughly about Azure and cloud computing.
I just have a short question about switching the color of sifr objects on
i just have a little design question. If i got this code public Interface
So, this question may be a little vague, but I have constant discussions about

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.