eXtropia: the open web technology company
Technology | Support | Tutorials | Development | About Us | Users | Contact Us
Resources
 ::   Tutorials
 ::   Presentations
Perl & CGI tutorials
 ::   Intro to Perl/CGI and HTML Forms
 ::   Intro to Windows Perl
 ::   Intro to Perl 5
 ::   Intro to Perl
 ::   Intro to Perl Taint mode
 ::   Sherlock Holmes and the Case of the Broken CGI Script
 ::   Writing COM Components in Perl

Java tutorials
 ::   Intro to Java
 ::   Cross Browser Java

Misc technical tutorials
 ::   Intro to The Web Application Development Environment
 ::   Introduction to XML
 ::   Intro to Web Design
 ::   Intro to Web Security
 ::   Databases for Web Developers
 ::   UNIX for Web Developers
 ::   Intro to Adobe Photoshop
 ::   Web Programming 101
 ::   Introduction to Microsoft DNA

Misc non-technical tutorials
 ::   Misc Technopreneurship Docs
 ::   What is a Webmaster?
 ::   What is the open source business model?
 ::   Technical writing
 ::   Small and mid-sized businesses on the Web

Offsite tutorials
 ::   ISAPI Perl Primer
 ::   Serving up web server basics
 ::   Introduction to Java (Parts 1 and 2) in Slovak

 

Introduction to UNIX for Web Developers
Time and Date  
Another set of useful tools are those that help you keep track of the time and date. There are two primary utilities that you will use for this purpose: date and cal.

The "date" utility simply displays the current time and date (according to the computer...recall that since you can login to a UNIX machine remotely, the date utility may not give you your local time if you are not in the same time zone as the computer you are logged in to). The "date" utility comes with several options that allow you to format the date displayed.

Options Description
MMDDhhmmYY This option may only be used by the superuser and gives you the ability to set the date. MM is the month (01-12). DD is the day (01-31). hh is the hour (00-23). mm is the minute (00-59) and YY is the year (00-99)
+%format This option specifies how the date is displayed. The valid formats include
a = weekday (represented as a name)
d = day of month (represented as a digit)
D = mm/dd/yy
h = month (represented as a name)
J = julian date
m = month (represented as a digit)
M = minute
n = newline
r = am/pm
S = second
t = tab
W = Day of week(represented as a digit)
y = last two digits in year

Check out the date utility in action

[Date]

The second time telling utility is the "Cal" utility that displays a calendar through standard output. The "cal" utility is fairly simple and takes only a month and a year as arguments. If no arguments are specified, it assumes the current month and year. If no month is specified, the utility will display all the months for the given year

Check out the following examples.

[Date]

[Spacer]
[Year with Cal]

Previous | Next | Table of Contents