Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

os lab

Rating
-
Sold
-
Pages
51
Grade
A+
Uploaded on
29-01-2022
Written in
2021/2022

Exam study book Mobile Wireless Middleware, Operating Systems, and Applications of Nalini Venkatasubramanian, Vladimir Getov, Stephan Steglich - ISBN: 9783642306075 (oslab)

Institution
Course

Content preview

OPERATING SYSTEMS LAB


EXPERIMENT -1
Exercise -1 a) Study of Unix/Linux general purpose utility command list
man,who,cat, cd, cp, ps, ls, mv, rm, mkdir, rmdir, echo, more, date, time, kill, history,
chmod, chown, finger, pwd, cal, logout, shutdown.
b) Study of vi editor.
c) Study of Bash shell, Bourne shell and C shell in Unix/Linux operating system.
d) Study of Unix/Linux file system (tree structure).
e) Study of .bashrc, /etc/bashrc and Environment variables.
Aim: Study of Unix/Linux general purpose utility command list
man,who,cat, cd, cp, ps, ls, mv, rm, mkdir, rmdir, echo, more, date, time, kill, history,
chmod, chown, finger, pwd, cal, logout, shutdown.

1) The man command:
man - an interface to the on-line reference manuals man is the system'smanual pager.
Each page argument given to man is normally the name ofaprogram,utilityorfunction.
Example:
$man pwd
Output:
PWD NAME
pwd – print working directory name
SYNOPSIS
pwd
DESCRIPTION
Pwd prints the path name of the working (current) directory



2) The who command:
who-show who is logged on
Print information about users who are currently logged in.
Example:
$who root
console july2 10:30
aaa tty 01july2 10:40
bbb tty02 july210:55
$

3) The cat command:
cat – concatenate files and print on the standard
outputConcatenateFILE(s),orstandardinput,tostandardoutput.

Example:


$cat >newfileHi
HellWelcom
$
The input operation is terminated by using <ctrl+d> command

Department of CSE, SSCE ~1~

, OPERATING SYSTEMS LAB


4) The mkdir
command:mkdir-
makedirectories
It creates the directories if they do not already exist.Example:
$mkdiruser1
$

5) The cd command:
cd-changedirectories
It is a command-line OS shell command used to change the current working
directory
Example: $ cd user1 user1
$

6) The cp command:
cp-copyfilesanddirectories
This command is used to create a duplicate of a file, a set of files or a directory The
cp command copies both text and binary files
Syntax: $cp source-file/directory destination-file/directory
Examples:
i) $cp file1file2
ii) $cpdir1/file1dir1/file2

2) The ps command:ps -
report a snapshot
ofthecurrentprocesses.
The ps command is used to display the attributes of processes
thatarerunningcurrently.
Example:
$ps
PID TTY TIME CMD
476 tty03 00:00:01 login
659 tty03 00:00:01 sh
684 tty03 00:00:00 ps
$

3) The ls command:
ls-listdirectorycontents
This command lists the contents in a directory.Syntax:
$lsExample:
$ls

4) The mv command:
Department of CSE, SSCE ~2~

, OPERATING SYSTEMS LAB
mv-move(rename)files
This command is used to move either an individual file, a list of files or
adirectorySyntax:
$mv source-file/directory destination-file/directoryExample:
$mvdir1/file1dir2
The mv command is also used to rename a file or directorySyntax:
$mv old-file-name new-file-
nameExample:
$mvfile1file7

5) The rm command:
rm-removefiles ordirectories
This command is used remove a file or a directory.Syntax:
$rmFilename
Example:
$rm file1

6) The rmdir command:
rmdir - remove empty directoriesThis
command is used to delete adirectory
Syntax:
$rmdir directory-
nameExample:
$rmdiruser1

7) The echo command:echo-
displayalineoftext
This command is used to display messages.
It takes zero, one or more arguments.Example:
$echo“HelloWorld”
HelloWorld
$

8) The more command:
more - file perusal filter for crt viewing This
command is used to display a file.
- It allows us to set the output page size and pauses at the end of each page to allow us to
read thefile.
Syntax:
$more filename
Example:
$more story1

9) The date command:
date-print or set the system date and time
Using this command, the user can display the current date along with the time nearest to
Department of CSE, SSCE ~3~

, OPERATING SYSTEMS LAB
the second
Example:
$date
Sat Jan1011:58:00IST2004
$

10) The time command:
time - time a simple command or give resource usageThis
command is used to knowthe resource usage
It runs a program or command with given arguments, generates a timing statistics about
the program run and directs this statistics report to the standard output.
Example:
$time real 0m0.000sUser
0m0.000ssys
0m0.000s
$

11) The kill command:kill-
Terminate a process
To kill a background process a kill command is used.
This command is given with the PID of the process to be killed as its argument
Example:
$kill 555
Here,555 is thePID of the process



12) The history command:
history – Used to display the history of previous executed commandsWith no
options, display the command history list with line numbers
Example:
$history
1 pwd
1 date
cal
2 history

13) The chmod command:
chmod-change filemode bits
The chmod command is used to change permissions of a file after its creation Only
the Owner or Super User can change file permissions
Syntax:
$chmod assignment-expression filename
Example:
$chmod u+x sample
$ls-ls ample

Department of CSE, SSCE ~4~

Connected book

Written for

Institution
Course

Document information

Uploaded on
January 29, 2022
Number of pages
51
Written in
2021/2022
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$5.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
chiranjeevijami

Also available in package deal

Get to know the seller

Seller avatar
chiranjeevijami sivani
Follow You need to be logged in order to follow users or courses
Sold
1
Member since
4 year
Number of followers
1
Documents
20
Last sold
4 year ago

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions