0% found this document useful (0 votes)
121 views4 pages

AIX Basics Student Guide-8

The document provides examples of correct and incorrect command formats in AIX. It shows the standard format for commands, options, and arguments. However, there are exceptions for some commands like tar, date, and ps that allow arguments without a minus sign for backwards compatibility. The date and cal commands are also demonstrated for checking dates and calendars. Additional commands like clear, echo, and banner are presented.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
121 views4 pages

AIX Basics Student Guide-8

The document provides examples of correct and incorrect command formats in AIX. It shows the standard format for commands, options, and arguments. However, there are exceptions for some commands like tar, date, and ps that allow arguments without a minus sign for backwards compatibility. The date and cal commands are also demonstrated for checking dates and calendars. Additional commands like clear, echo, and banner are presented.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Student Notebook

Command Format Examples


WRONG: RIGHT:
1. Separation: 1. Separation:
$ mail - f newmail $ mail -f newmail
$ who-u $ who -u
2. Order: 2. Order:
$ mail newmail -f $ mail -f newmail
$ team01 mail $ mail team01
$ -u who $ who -u
3. Multiple Options: 3. Multiple Options:
$ who -m-u $ who -m -u
$ who -m u $ who -mu
4. Multiple Arguments: 4. Multiple Arguments:
$ mail team01team02 $ mail team01 team02
THERE ARE EXCEPTIONS!!

Figure 2-5. Command Format Examples

Notes:

Introduction
The commands in the visual display some examples of correct and incorrect command
formats.

Exceptions
A few commands in AIX do not adhere to the common command format. Commands
such as tar, date, and ps accept arguments that do not begin with a minus sign (-).
This is to ensure backwards compatibility with older implementations of UNIX.
$ tar cvf /dev/rmt0 /home/team01/*
$ ps aux
$ date +%D

2-8 AIX 7 Basics


V3.1
Student Notebook

The date and cal Commands


Checking the date:

$ date

Wed Nov 14 10:15:00 GMT 2007

 Looking  at  a  month:  


$cal 1 2003  
 
January 2003
Sun Mon Tue Wed Thu Fri Sa
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

 
Looking  at  a  year:    
 
        $ cal 2007  

Figure 2-6. The date and cal Commands

Notes:

Introduction
The visual shows how the date and cal commands can be executed.

Unit 2. Using the System 2-9


Student Notebook

The clear, echo, and banner Commands


clear: Clears the terminal screen

$ clear

echo: Writes what follows to the screen


$ echo Lunch is at 12:00
Lunch is at 12:00
$

banner: Writes character strings in large letters to the screen


$ banner Hello

Figure 2-7. The clear, echo, and banner Commands

Notes:

More commands
This visual shows how the clear, echo, and banner commands work.
Note : Instead of echo you can use the print command:
$ print Lunch is at 12:00
Lunch is at 12:00

2-10 AIX 7 Basics


Student Notebook

Command Format Examples


WRONG: RIGHT:
1. Separation: 1. Separation:
$ mail - f newmail $ mail -f newmail
$ who-u $ who -u
2. Order: 2. Order:
$ mail newmail -f $ mail -f newmail
$ team01 mail $ mail team01
$ -u who $ who -u
3. Multiple Options: 3. Multiple Options:
$ who -m-u $ who -m -u
$ who -m u $ who -mu
4. Multiple Arguments: 4. Multiple Arguments:
$ mail team01team02 $ mail team01 team02
THERE ARE EXCEPTIONS!!

Figure 2-5. Command Format Examples

Notes:

Introduction
The commands in the visual display some examples of correct and incorrect command
formats.

Exceptions
A few commands in AIX do not adhere to the common command format. Commands
such as tar, date, and ps accept arguments that do not begin with a minus sign (-).
This is to ensure backwards compatibility with older implementations of UNIX.
$ tar cvf /dev/rmt0 /home/team01/*
$ ps aux
$ date +%D

2-8 AIX 7 Basics

You might also like