Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-21-2004, 07:47 AM   #1
Registered: May 2004
Distribution: Fedora Core 4
Posts: 92

Rep: Reputation: 15
redirecting out of 'time' command

I am really embarrased to ask this simple question in the forum.. by right now I am stumped and I have no idea how accomplish what I want.

How do I redirect the output of the 'time' command?

Let us say I want to time a executable, on the sunos I used to type

time `a.out > output` >& timeout &

but in linux it saying 'ambiguous redirect'
How do I accomplish what I want?

BTW I am using tcsh

thanks for your help.
Old 06-12-2004, 09:32 PM   #2
Registered: May 2004
Location: At Keyboard
Distribution: Mandrake 10.0, SuSE 9.0
Posts: 114

Rep: Reputation: 15
Do you have to use tcsh? With bash you can use the -o ( or --output= ) option to output to a given file.

time -o <output_file> <command>

Although this doesn't work with tcsh, not quite what you were looking for...
Old 06-13-2004, 12:37 AM   #3
Registered: May 2004
Distribution: Fedora Core 4
Posts: 92

Original Poster
Rep: Reputation: 15
I realized if I force tcsh to use the /usr/bin/time instead of the built-in 'time' I could use the -o option.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
what is the command 'time'? buuchanh Linux - Newbie 3 10-13-2005 02:46 PM
time command krock923 Programming 11 07-09-2005 05:46 PM
Redirecting output of running command tommyr1216 Linux - General 3 03-04-2005 09:20 PM
Redirecting output to a command-line argument of another command madiyaan Linux - Newbie 1 02-19-2005 05:35 PM
time command twantrd Linux - General 3 12-08-2004 04:54 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:52 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration