View Single Post

  #6 (permalink)  
Old 05-15-2006, 04:55 PM
monk's Avatar
monk monk is offline
Senior Member
User
 
Join Date: Jan 2005
Location: Tibet
My distro: Debian GNU/Linux
Posts: 482
Rep Power: 5
monk will become famous soon enough monk will become famous soon enough
Default

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
When you type time command with full path, shell will run internal time command. To verify this use following command:
Code:
type -a time
time is a shell keyword
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:
btw, what does it mean when a command is inside a parenthesis?
It is nothing but one of the compound command. ( time ls ) is executed in a subshell environment so that you can capture its output. Please see this article for more information: http://www.cyberciti.biz/nixcraft/vi...tand-which.php
Reply With Quote