This is a discussion on How can I redirect the output of time command to file within the Linux software forums, part of the Linux Getting Started category; How can I redirect the output of time command to file... I tried, -bash-3.00# time > file1.txt real 0m0.000s user ...
|
|||||||
| Register | FAQ | Members List | Calendar | Forgotten your password? | Mark Forums Read |
|
|||
|
How can I redirect the output of time command to file...
I tried, -bash-3.00# time > file1.txt real 0m0.000s user 0m0.000s sys 0m0.000s but it didn't work... thanks, warren |
| Sponsored Links | ||
|
|
|
||||
|
I just want to clarify few things here
1) time command is external as well as internal. To use GNU version of external command use full path: Code:
/usr/bin/time -o /tmp/output.txt ls Code:
type -a time time is /usr/bin/time As you see time command is both internal and external to shell. That is why you got an error when you use time –o syntax. 2) Quote:
|
|
|||
|
monk, cool info.
It is better to use full path and type command is a real lifesaver. |
|
|||
|
hi i wanted to append my output to the log file, but what is wrong i cant seem to get it to work, pls help,thks.
58 15 * * * /usr/bin/cp /a/p/s/originalSDR-config.xml /a/p/s/sdr-stm66.xml 2>>/a/l/s/SDRtestresults.log ; /usr/bin/cp /a/p/s/testSDR.xml /a/p/s/sdr-stm66.xml 2>>/a/l/s/SDRtestresults.log |
|
||||
|
clueless,
i think you need to add -v option to cp command, which explain what is being done including errors. Code:
58 15 * * * /usr/bin/cp -v /a/p/s/originalSDR-config.xml /a/p/s/sdr-stm66.xml 2>>/a/l/s/SDRtestresults.log ; /usr/bin/cp -v /a/p/s/testSDR.xml /a/p/s/sdr-stm66.xml 2>>/a/l/s/SDRtestresults.log |
|
|||
|
Quote:
that is just a test procedure, the actual requirement is to copy first then run a script, e.g: 28 10 * * * /usr/bin/cp -v /a/p/s/originalSDR-config.xml /a/p/s/sdr-stm66.xml 2>>/a/l/s/SDRtestresults.log ; /a/s/s/SDRGenerate.sh 2>>/a/l/s/SDR.log 1>/a/l/s/SDR2.log but, when i try the above, the -v does not work, illegal option?? pls help..thks.. |
![]() |
| Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Find out information about my file - explaining ls command | sweta | Getting started tutorials | 1 | 01-11-2007 05:21 PM |
| How to redirect Output | puppen | Shell scripting | 15 | 12-06-2006 09:44 PM |
| how to create multiple file in a single command | selvam | Shell scripting | 3 | 07-26-2006 02:01 AM |
| How can I get some specific characters of dd command output | warren | Shell scripting | 2 | 05-24-2006 04:59 PM |
| command to install tar file on freebsd | hellBoy | All about FreeBSD/OpenBSD/NetBSD | 1 | 01-08-2006 01:02 AM |