Well Documented

Simply Solutions

Time a Compilation in Linux

Time is a part of the bash shell and is a very useful program. With it you can easily determine the time it takes your machine to complete any shell task. The syntax depends on the bash command.

for a simple command like cd, the syntax is:
time cd

for a series of commands separated by &&, the syntax is:
time { cd && ls; }

Timing the amount of time it takes to configure and build an application is probably the best example of this feature. For example:
time { ./configure && make depend && make; }

Another great example is using time with Locate to determine seek time. For example:
time locate manual.pdf

Advertisements

Single Post Navigation

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: