星期日, 3月 20, 2011

"time" command in Linux

In Linux, we can use "time" to measure a command's run time easily. If we want to save the time information. you could type /usr/bin/time -o output.txt ls Don't type "time". I guess "time" is a reserve word of shell. it's only useful for GNU version's time.
If you want to use "GNU time" in Mac OSX, you can download "http://ftp.gnu.org/gnu/time/time-1.7.tar.gz" and install. or type brew install gnu-time (If you use homebrew to manage your open source software.)


---
for a simple note.

沒有留言: