Mobile Wireless Middleware, Operating Systems, and Applications
Exam study book Mobile Wireless Middleware, Operating Systems, and Applications of Nalini Venkatasubramanian, Vladimir Getov, Stephan Steglich - ISBN: 9783642306075 (oslab)
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~
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through EFT, credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying this summary from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller chiranjeevijami. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy this summary for R102,05. You're not tied to anything after your purchase.