Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 8

Experiment:01

Write a program for cal command


Expriment:-02
Write a program for Date command
Expriment:-04
Write a program make directory &cd
Expriment:-05
Write a program for who command
Experiment-6
Defination of command with syntax.
Command :
A command is an instruction given by a user telling a computer to do something, such a run a
single program or a group of linked programs. Commands are generally issued by typing them in
at the command line and then pressing the ENTER key, which passes them to the shell.

There are difine following type command:

cal- Display a calendar


cat - Concatenate and print (display) the content of files
cd - Change Directory
clear- Clear terminal screen
cp - Copy one or more files to another location
kill - Stop a process from running
mkdir - Create new folder(s)
mv - Move or rename files or directories
pwd - Print Working Directory
rmdir- Remove folder(s)

Syntax :

In computer science, the syntax of a computer language is the set of rules that defines the
combinations of symbols that are considered to be a correctly structured document or fragment in
that language. This applies both to programming languages, where the document
represents source code, and markup languages, where the document represents data.
The syntax of a language defines its surface form.[1] Text-based computer languages are based on
sequences of characters, while visual programming languages are based on the spatial layout and
connections between symbols (which may be textual or graphical). Documents that are
syntactically invalid are said to have a syntax error.
Syntax – the form – is contrasted with semantics – the meaning. In processing
computer languages, semantic processing generally comes after syntactic processing, but in some
cases semantic processing is necessary for complete syntactic analysis, and these are done
together or concurrently
 cal command
(print calendar)

The cal command displays a simple calendar.

If no options are given it displays the current month, with weeks starting on Sunday.

Line 1 shows the cal command


Lines 2-8 are the output of the cal command showing us the current months calendar 
Line 9 is the prompt again

>cal

July

S M T W T F S

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

>

Some options include...

cal -3 shows the output format as prev/current/next


cal -m shows the weeks starting on Monday
cal -y shows the current year.

You might also like