In these notes, Covered all the topics of operating systems briefly.
COs -
Analyze the structure of OS and basic architectural components involved in OS design.
Compare and contrast various CPU scheduling algorithms.
Evaluate the requirements for the process synchronization and co-ordinatio...
pwd : Print working Directory
pwd stands for ‘present working directory’. When you write pwd on prompt it will display the
current working directory.
Usage: Print working Directory name.
Syntax: pwd
Example:
mkdir : make directory
This command is used to create a new directory.
Syntax : mkdir directory name.
Usage : Creates new directory.
Example:
cd : Change Directory
This command is used to change the directory.
Usage : Change working directory.
Syntax : cd [directory]
Options:
_cd …Change working directory to home directory
_ cd ..…change working directory to parent directory
_ cd /user/lib…change working directory to absolute path/user/lib _ cd doc/letters…change
working directory to relative path doc/letters
Example:
Operating System 1
, 200090107080
rmdir : Remove Directory
Remove Directory. This command is used to remove a directory.
Usage : Creates new directory
Syntax : rmdir directory name
Example :
File commands :
cat:
It is used to create a new file. Press ctrl + C to indicate EOF.
Cat > file name - Creates new file.
Cat >> filename - Appends data to an existing file.
Usage: Display file contents, creates new file , or appends data to an existing file.
Syntax: Cat < file name - Displays file contents.
Example:
ls:
It lists all the filenames in alphabetical order which are present in the current directory.
Usage : List out contents of a directory.
Syntax: ls [directory]
Example:
Operating System 2
, 200090107080
cp :
Copy command, this command is used to copy a file.
Usage : Copies a file or group of files.
Options:
i: interactive copying (Asks before overwriting a destination file.)
r: recursive copying (It copies directory structure)
Syntax : cp [-irp ] file1 [file2… ] target
Example:
mv :
Move / Rename file, this command is used to rename files.
Usage : Renames a file, or moves a file or group of files.
Syntax : mv [-if] file [file2 …] target
Example :
rm :
Removes file , this command removes the given file or files supplied to it.
Usage : Removes files (deletes files)
Syntax : rm [-f] [-i] [-r] file
Options :
-i: interactive removal
-r: Recursive removal
-f: Forceful removal
Example:
Operating System 3
, 200090107080
wc:
It contains the number of lines, words and characters from the specified file or files.
Usage:
counts the number of characters , words or lines in a given input file. If the file is not given it
takes input from standard input.
Syntax: wc[file]
Options:
-l counts number of lines
-w counts number of words
-c counts number of characters
Example:
chmod:
chmod command is used to change the access mode of the file.
Usage:
change file permissionsIn Relative mode , the options first indicate whose access is to be
changed u (user,you), g (group), o(other), or a (all) ; then indicate the type of action +
(add),- (delete), or = (set); and then specify the access to be set r(read) and w(write/delete)
or x (execute).In absolute mode , three numbers represent the protections for the user ,
group and others ,Each number is a sum of 1 (for execute access), 2(for write/delete access)
and 4 (for read access).
Syntax: chmod [ugoa] [rwx] file (Relative Permission)
Example:
cmp :
compare the cmp utilities compares two files of any type and writes the result to the standard
o/p.
Syntax : cmp file1 file2
Usage : compares two files and given the location of the first mismatch.
Example :
Operating System 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 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 these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller vaibhav51ppsv2020. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $3.49. You're not tied to anything after your purchase.