Linux Time Command Examples

There are times when you might want to profile your program on parameters like:

Time taken by program in user modeTime taken by program in kernel modeAverage memory usage by the programetcOn Linux we have a utility ‘time’ that is designed specifically for this purpose. The utility ‘time’ takes a program name as an input and displays information about the resources used by the program. Also, if the command exists with non-zero status, this utility displays a warning message and exit status.