Exp 1 Basic Unix Commands
Exp 1 Basic Unix Commands
S(IT D)
Aim:
To Study about basic UNIX Commands.
Purpose : It is used to display the contents of the file as well as used to create a new file.
Output
Command : More
Purpose : It is used to display the contents of the file on the screen at a time.
Output
Command : Wc
Purpose : It is used to count the number of lines ,words and characters in a file or
group of files.
Output
Command : File
Output
Command : Spell
Output
Command : Split
Purpose : It is used to split the given file into smaller pieces of given size.
Syntax : split –size <file name > < splitted file name >
Output
Command : Cp
Output
Command : Mv
Purpose : It is used to move a file within a directory with different names and also used to move a
file to different directory with its original name.
Output
Command : Rm
Output
Command : Banner
Output
Command : Who
Purpose : It is used to get the information about all the users currently working in
the system.
Syntax : who
Output
Command : Date
Syntax : date
Output
Command : Cal
Purpose : It prints the calender for the specified year and month.
Output
Command : Id
Syntax : id
Output
Command : Clear
Syntax : clear
Output
BEFORE
AFTER
Command : Tput
Output
Command : Uname
Purpose : It is used to display the details about the OS in which we are working.
Output
Command : Tty
Purpose : It is used to know the terminal name on which we work.
Syntax : tty
Output
Command : Pwd
Purpose : It is used to display the absolute pathname of current working directory.
Syntax : pwd
Output
Command : Bc
Purpose : It is used to perform simple mathematical calculations.
Syntax : bc <operation>
Output
Command : Ls
Output
Command : Echo
Output
Command : Man
TEST.TXT
Command : Head
Output
Command : Tail
Output
Command : Pr
Purpose : It is used to display the contents of the file by separating them into pages
and each page begins with the header information.
Output
Command : Cut
Purpose : It is used to extract selected fields or columns from each line of one or
more files and display them on the standard output device.
Output
Command : Paste
Purpose : It concatenates the line from each input file column by column with tab
characters in between them.
Output
Command : Join
Purpose : It is used to extracts common lines from two sorted files and there should
be the common field in both file.
Purpose : It compares adjacent lines in the file and displays the output by
eliminating duplicate adjacent lines in it.
Output
Command : Sort
Purpose : It sorts one or more files based on ASCII sequence and also to merge the
file.
Output
Command : Nl
Output
Command : Tr
Output
Command : Tee
Purpose : It is used to read the contents from standard input or from output of another
command and reproduces the output to boyh in standard output and direct into output to
one or more files.
Output
Command : grep
Purpose : It is used to search the specified pattern from one or more files.
RESULT:
Thus the above unic commands are executed and the output was verified successfully.