1. A Quick Review of the Basics

This chapter provides a review of the Unix system, including the file system, basic commands, filename substitution, I/O redirection, and pipes.

Some Basic Commands

Displaying the Date and Time: The date Command

The date command tells the system to print the date and time:

$ date Thu Dec  3 11:04:09 MST 2015 $

date prints the day of the week, month, day, time (24-hour clock, the system’s time zone), and year. Throughout the code examples in this book, whenever we use boldface type like this, it’s to indicate what you, the user, type in. Normal face type like this is used to indicate what the Unix system prints. Italic type is used for comments in interactive sequences.

Every Unix command is submitted to the ...

Get Shell Programming in Unix, Linux and OS X, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.