Sie sind auf Seite 1von 4

Experiment No.

___4__
COMMAND LINE INTERFACE

1. Objective(s):
The activity aims
1.1 To discover the different UNIX commands
1.2 To familiarize the students with the Command Line Interface.
2. Intended Learning Outcomes (ILOs):
The students shall be able to:
2.1 To categorize the UNIX commands according to usage.
3. Discussion (not more than 300 words):
As a UNIX user, you will issue commands to do useful operating system works. Although commands
are just one part of UNIX, they are a very important part. UNIX commands enable you to manage and
report on your part of the UNIX computing environment.

Over the years more than two hundred commands have evolved within UNIX. As with any evolutionary
situation, some commands have gone wayside or were replaced by better and more efficient
commands. An ordinary UNIX user has mastered to use a few dozen commands regularly. To help you
understand these commands clearly, they are categorized by their general utility. Bear in mind, though,
that a command may fit well in more than one category.

4. Resources:
Personal computer with Unix or unix-based operating system

5. Procedure:
5.1 Start a terminal session with your unix or unix-based oprating system.
5.2 Read the white paper or documentation of the commands listed below using the command
man <name-of-command> entered in the terminal
Command Action

at Executes commands at a given time


banner Prints large letters on screen or printer
bc Invokes a basic calculator utility
cal Displays calendar
calendar Manages a calendar-based reminder service
cancel Unschedules printer jobs
cat Concatenates (appends) files
cd Changes the working directory
chgrp Modifies the group ids of files
chmod Modifies permissions (attributes) of files
chown Modifies the owner ids of files
clear Erases the terminal display
cmp Compares two files for equality
comm. Processes lines common to two files
cp Copies files
cron Executes scheduled commands
crypt Encrypts the contents of a file
csh Invokes the C shell
cut Cuts selected text from lines in a file
date Displays (sets) the system date
dc Invokes a desktop calculator utility
df Shows amount of disk space still free
diff Displays differences in two text files
du Shows disk usage
echo Displays text on the terminal
ed Simple line editor
egrep An extended grep command
env Sets and reports the environment
false Returnsd with a non-O exit value
fgrep Agrep command for fixed strings
file Displays the type of files
find Finds files in the directory tree
grep Searches a file for a matching pattern
head Displays the beginning of a text file
kill Stops processes
less Displays the contents of a file
ln Makes a link to a file
lp Sends output to a system printer
lpstat Reports the status of the printer queue
ls Lists files in directories
mail Initiates the electronic mail system
mesg Controls message printing on a terminal
mkdir Creates a new directory
more Displays text a screen at a time
more Displays the contents of a file
nice Adjusts the priority of a process
nl Provides line numbers for lines of a file
passwd Maintains user passwords
paste Merges lines of text
pr Prints files to the screen or printer device
ps Displays process information
pwd Displays the name of the working directory
read Reads one item into a variable
rm Removes (erases) files
rmdir Removes an empty directory
sh Invokes another command shell
sleep Suspends execution for a specified time
sort Collates (alphabetizers) lines of a file
spell Checks spelling of words in a file
split Divides a file into smaller parts
sty Makes or displays terminal port settings
su Enables superuser privilege
sync Flushes (writes) disk buffers to disk
tail Displays the end of a text file
tee Copies output from a pipeline to a file
test Tests conditions
time Reports the elapsed time of a command
true Returns with a 0 exit value
tty Shows the device name of the terminal
umask Establishes the file-creation mode for a user
uname Prints the name of the UNIX system
uniq Reports repeated lines in a file
vi Full-screen visual editor
wall Writes a message to all users
wc Counts lines, words, and characters in a file
who Displays the system’s logged users
who am i Reports a user’s log name
write Outputs a message on another user’s terminal

5.3 Categorize the commands into the following:


5.3.1 File Management Commands include commands that you use to copy, delete, archive, and
manage other aspects of your files.
5.3.2 Directory Management Commands allow user to manage the directories need to add to the
file system. Other directory-management commands enable a user to navigate efficiently
through the directories in the file system.
5.3.3 File Processing Commands are closely related to file-management commands. You use
file-processing commands to work with a file’s contents rather than managing the file itself
as a whole
5.3.4 Device-related commands provide system managers a tool to establish the proper
computing environment. There are a few device-related commands that ordinary users find
useful. Most of these commands concern themselves with the operation of the terminal.
5.3.5 Multiprocessor/Multiuser Commands are designed to work within this environment. The
multiprocessing/multiuser command category includes commands that are more directly
involved with or related to the multiprocessing/multiuser aspects of UNIX
5.3.6 Office automation is a term given to computer activity that assists or automates typical office
overhead work. Many UNIX commands fit this description. The office automation
commands enable users to handle the overhead of daily office communications,
calculations, scheduling and time management.
5.3.7 Shell Scripting Commands are executable text files that contain UNIX commands. Through
the creation of appropriate shell scripts, you can automate sequences of commands.
5.3.8 Text-Editing Commands are one of the most widely appreciated tools of the operating
system as these provide capability to edit texts. It includes text editors with corresponding
strengths which you can use to create reports, memos, documents, or anything done in
writing. When text editing is coupled with text formatting, spell checking, and printing, the
full capabilities of word processing are available to you.
Course: Experiment No.:
Group No.: Section:
Group Members: Date Performed:
Date Submitted:
Instructor:

6. Data and Results:

7. Conclusion:

8. Assessment (Rubric for Laboratory Performance):

Das könnte Ihnen auch gefallen