System Manipulation

System manipulation is really not a good term for these functions. Basically, it is reading something from the system or performing a system call. Other functions also could be included here (such as exec, fork, kill, and times), but these are the basic ones.

The time Function

time returns the number of seconds since the birth of UNIX, January 1, 1970, Universal Time. It can be used to determine how long it has been since a file was accessed, or how long it takes to complete a task. A common function of time is to use it as a parameter of localtime. An example of how to use this function is shown with the localtime function section.

The localtime Function

The localtime function returns a nine-element list with the time corrected ...

Get Practical UNIX now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.