Professional Documents
Culture Documents
OSFILE
OSFILE
• Introduction to OS
An operating system acts as an intermediary between the user of a computer and computer
hardware. The purpose of an operating system is to provide an environment in which a user
can execute programs in a convenient and efficient manner.
An operating system is a software that manages the computer hardware. The hardware must
provide appropriate mechanisms to ensure the correct operation of the computer system and
to prevent user programs from interfering with the proper operation of the system.
Operating System – Definition:
• An operating system is a program that controls the execution of application programs
and acts as an interface between the user of a computer and the computer hardware.
• A more common definition is that the operating system is the one program running at
all times on the computer (usually called the kernel), with all else being application
programs.
• An operating system is concerned with the allocation of resources and services, such as
memory, processors, devices, and information. The operating system correspondingly
includes programs to manage these resources, such as a traffic controller, a scheduler,
memory management module, I/O programs, and a file system.
Functions of Operating system – Operating system performs three functions:
1. Convenience: An OS makes a computer more convenient to use.
2. Efficiency: An OS allows the computer system resources to be used in an efficient
manner.
3. Ability to Evolve: An OS should be constructed in such a way as to permit the effective
development, testing and introduction of new system functions without at the same
time interfering with service.
Operating system as User Interface –
1. User
2. System and application programs
3. Operating system
4. Hardware
Every general purpose computer consists of the hardware, operating system, system
programs, and application programs. The hardware consists of memory, CPU, ALU, and I/O
devices, peripheral device, and storage device. System program consists of compilers, loaders,
editors, OS, etc. The application program consists of business programs, database programs.
Every computer must have an operating system to run other programs. The operating system
coordinates the use of the hardware among the various system programs and application
programs for various users. It simply provides an environment within which other programs
can do useful work.
The operating system is a set of special programs that run on a computer system that allows
it to work properly. It performs basic tasks such as recognizing input from the keyboard,
keeping track of files and directories on the disk, sending output to the display screen and
controlling peripheral devices.
OS is designed to serve two basic purposes:
1. It controls the allocation and use of the computing System’s resources among the
various user and tasks.
2. It provides an interface between the computer hardware and the programmer that
simplifies and makes feasible for coding, creation, debugging of application programs.
The Operating system must support the following tasks. The task are:
1. Provides the facilities to create, modification of programs and data files using an
editor.
2. Access to the compiler for translating the user program from high level language to
machine language.
3. Provide a loader program to move the compiled program code to the computer’s
memory for execution.
4. Provide routines that handle the details of I/O programming.
I/O System Management –
The module that keeps track of the status of devices is called the I/O traffic controller. Each I/
O device has a device handler that resides in a separate process associated with that device.
The I/O subsystem consists of
• A memory Management component that includes buffering caching and spooling.
• A general device driver interface.
Drivers for specific hardware devices.
Assembler –
The input to an assembler is an assembly language program. The output is an object program
plus information that enables the loader to prepare the object program for execution. At one
time, the computer programmer had at his disposal a basic machine that interpreted,
through hardware, certain fundamental instructions. He would program this computer by
writing a series of ones and Zeros (Machine language), place them into the memory of the
machine.
Compiler –
The High-level languages- examples are FORTRAN, COBOL, ALGOL and PL/I are processed by
compilers and interpreters. A compiler is a program that accepts a source program in a “high-
level language “and produces a corresponding object program. An interpreter is a program
that appears to execute a source program as if it was machine language. The same name
(FORTRAN, COBOL, etc.) is often used to designate both a compiler and its associated
language.
Loader –
A Loader is a routine that loads an object program and prepares it for execution. There are
various loading schemes: absolute, relocating and direct-linking. In general, the loader must
load, relocate and link the object program. The loader is a program that places programs into
memory and prepares them for execution. In a simple loading scheme, the assembler outputs
the machine language translation of a program on a secondary device and a loader is places
in core. The loader places into memory the machine language version of the user’s program
and transfers control to it. Since the loader program is much smaller than the assembler,
those make more core available to the user’s program.
History of Operating system –
Operating system has been evolving through the years. Following Table shows the history of
OS.
First of all, make a backup of your Windows 10 operating system. Because this is a risky
process and any error during installation may leave your system into an inconsistent state.
Creating a backup of the Windows 10 operating system is an optional process but it is highly
recommended. Once the backup is completed, it’s time to prepare the Ubuntu for installation
alongside Windows 10. To make a backup of whole Windows 10 system, you can use windows
default backup utility through which you can create a backup and restore it in case of any
error.
Following are the high-level steps for installation which we will cover in detail in this tutorial:
• Download Ubuntu ISO image file. In this tutorial, we are installing Ubuntu 18.04 LTS
Desktop version.
• Create a bootable USB drive to write Ubuntu image file to USB.
• Shrink the Windows 10 partition to create space for Ubuntu.
• Run the Ubuntu live environment and install it.
We will cover these steps one by one in detail.
3. Once the download has been completed it is the time to create a bootable USB drive.
4. If the File system is not FAT32, select the FAT32 from the dropdown list and click on
Start button.
5. Once the format has been completed your USB drive is with the FAT32 file system.
Once the USB has been formatted with the FAT32 file system, now download the tool
“unetbootin” to make the USB bootable. Following are the steps to download and install the
unetbootin tool.
1. Download the tool from this URL (for windows)
1. https://unetbootin.github.io/
2. Once the tool has been downloaded, you need to install & run it.
3. Select the option “DISK IMAGE” and then browse & select the downloaded Ubuntu ISO
path. In addition to this, also select the USB drive in which you want the Ubuntu setup
to be installed. Once done, Click OK.
4. The setup will start making the bootable USB and will start to notify once the process has
been completed.
Once the USB drive is ready, it’s time to make some space to install the Ubuntu. To do this we
will use the windows disk management utility to shrink up space for the Ubuntu.
3. Right click on the drive usually “C:” which has the biggest free space and select the “Shrink
Volume” Option.
4. A window will appear, showing up the best possible size.
Once the shrinking process has been completed its time to run the Ubuntu live environment
and then install it.
4. A window will appear showing what will happen to your disk. Press continue to proceed
with the installation.
5. Now the Ubuntu personalization wizard will be started and will ask your location. Select
your location and then press continue.
6. Select your keyboard layout and press continue.
7. Next, it will ask the computer name, username and the password to create a default user.
Save this password as you will require it in future to use this system. Enter the computer
name, username and password and press continue.
8. The setup will start and copy the files from a USB drive to the actual hard disk drive.
9. Once the setup has been completed, it will ask to reboot the system.
Once the system has been rebooted, you can see that the bootloader will ask which operating
system you want to start. Select windows or ubuntu as per your requirement.
PRACTICAL-2
Implementing Linux Commandwords
Using man,cat,touch,ls,script,pwd,mkdir,rm,cd.
• Man command in Linux is used to display the user manual of any command that we
can run on the terminal. It provides a detailed view of the command which includes
NAME, SYNOPSIS, DESCRIPTION, OPTIONS, EXIT STATUS,
RETURN VALUES, ERRORS, FILES, VERSIONS, EXAMPLES,
AUTHORS and SEE ALSO.
• Cat Cat(concatenate ) command is very frequently used in linux.It reads data from file
and give their content as output.It helps us to create,view,concatenate files.So let us
see some frequently used cat commands.
• Touch The touch command is a standard command used in UNIX/Linux operating
system which is used to create, change and modify timestamps of a file.
• Ls The Ls command is used to get a list of files and directories. Options can be used to
get additional information about the files.
• Script This script command is very helpful for system admin. If any problem occurs to
the system, it is very difficult to find what command was executed previously. Hence,
system admin knows the importance of this script command.
• Pwd pwd stands for Print Working Directory. It prints the path of the working
directory, starting from the root.
• pwd -L: Prints the symbolic path.
pwd -P: Prints the actual path.
• mkdir command in Linux allows the user to create directories (also referred to as
folders in some operating systems )
• rm stands for remove here. rm command is used to remove objects such as files,
directories, symbolic links and so on from the file system like UNIX.
• cd command in linux known as change directory command. It is used to change current
working directory.
OUTPUT-:
pratik@pratik-Inspiron-3543:~$ man ls
HELLO! I am Pratik.
I am in OS LAb
pratik@pratik-Inspiron-3543:~$ ls
'!'
activity
activity.cpp
activity.o
arrayman
arrayman.cpp
arrayman.o
binary.cpp
binarysearch
binarysearch.cpp
binarysearch.o
btreetravel
btreetravel.cpp
btreetravel.o
Desktop
Documents
Downloads
easytether.destop
examples.desktop
f1
f2
facedetection.cpp
FCFS
FCFS.cpp
FCFS.o
firstfit
firstfit.cpp
firstfit.o
hackerrank
hackerrank.cpp
hackerrank.o
HashMapCode.class
HashMapCode.java
HashMap.java
HelloWorld.class
HelloWorld.java
IdeaProjects
JAVA.java
longestcommonsubsequence
longestcommonsubsequence.cpp
longestcommonsubsequence.o
maxndmin
maxndmin.cpp
maxndmin.o
minispanning
minispanning.cpp
minispanning.o
mozilla.pdf
multiplymat
multiplymat.cpp
multiplymat.o
Music
mydir
myfile1
myfile2
myfile3
myfile4
myfile5
myfile6
myfile7
myfile8
OSfile
OSfile3
OSfile4
OsPractical
Pictures
prismspan
prismspan.cpp
prismspan.o
Public
quicksort2
quicksort2.cpp
quicksort2.o
ritikp
selection
selection.cpp
selection.o
'SJF(NON-pre)'
'SJF(NON-pre).cpp'
'SJF(NON-pre).o'
'SJF(pre)'
'SJF(pre).cpp'
'SJF(pre).o'
snap
Templates
test
test1
test2
test3
test.cpp
test.o
text
treefortraversal.cpp
Videos
'VirtualBox VMs'
xaa
pratik@pratik-Inspiron-3543:~$ ll
total 3952
-rw-rw-r-- 1 pratik pratik 679670 Mar 29 22:36 'Screenshot from 2019-03-29 22-
25-04.png'
pratik@pratik-Inspiron-3543:~$ ll
total 3952
-rw-rw-r-- 1 pratik pratik 679670 Mar 29 22:36 'Screenshot from 2019-03-29 22-
25-04.png'
pratik@pratik-Inspiron-3543:~$ pwd -L
/home/pratik
pratik@pratik-Inspiron-3543:~$ pwd -P
/home/pratik
pratik@pratik-Inspiron-3543:~$ mkdir -p -v first/second/third
pratik@pratik-Inspiron-3543:~$ rm 1.txt
pratik@pratik-Inspiron-3543:~$ cd Downloads
pratik@pratik-Inspiron-3543:~/Downloads$ rm 1.txt
pratik@pratik-Inspiron-3543:~/Downloads$
PRACTICAL-3
Implementing Linux Commandwords
Echo,who,whoami,find,type,cp,
sleep,shutdown,sort,out,tr,grep,free,tr,cut,vi,dd,dw,xx,escape.
• Echo command in linux is used to display line of text/string that are passed as an
argument . This is a built in command that is mostly used in shell scripts and batch
files to output status text to the screen or a file.
•
• Who command is used to find out the following information :
1. Time of last system boot
2. Current run level of the system
3. List of logged in users and more.
• Whoami command is used both in UNIX OPERATING SYSTEM and as well as in
WINDOWS OPERATING SYSTEM .
• It is basically the concatenation of the strings “who”,”am”,”i” as whoami.
• It displays the username of the current user when this command is invoked.
• It is similar as running the id command with the options -un.
• Find The find command in UNIX is a command line utility for walking a file hierarchy.
It can be used to find files and directories and perform subsequent operations on
them.
• Cp cp stands for copy. This command is used to copy files or group of files or
directory.
• Sort SORT command is used to sort a file, arranging the records in a particular order.
By default, the sort command sorts file assuming the contents are ASCII. Using options
in sort command, it can also be used to sort numerically.
• Grep The grep filter searches a file for a particular pattern of characters, and displays
all lines that contain that pattern.
• Tr The tr command in UNIX is a command line utility for translating or deleting
characters.
• dd is a command-line utility for Unix and Unix-like operating systems whose primary
purpose is to convert and copy files.
• Exit command in linux is used to exit the shell where it is currently running. It takes
one more parameter as [N] and exits the shell with a return of status N. If n is not
provided, then it simply returns the status of last command that is executed.
OUTPUT-:(Scripted File)
Script started on 2019-02-04 09:49:42+0530
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ #[K#]0;pratik@pratik-Inspiron-3543:
~##[01;32mpratik@pratik-Inspiron-3543#[00m:#[01;34m~#[00m$ #[K#]0;pratik@pratik-
Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-3543#[00m:#[01;34m~#[00m$
#[K#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ #[K#]0;pratik@pratik-Inspiron-3543:
~##[01;32mpratik@pratik-Inspiron-3543#[00m:#[01;34m~#[00m$ #[K#]0;pratik@pratik-
Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-3543#[00m:#[01;34m~#[00m$
#[K#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ #[K#]0;pratik@pratik-Inspiron-3543:
~##[01;32mpratik@pratik-Inspiron-3543#[00m:#[01;34m~#[00m$ #[K#]0;pratik@pratik-
Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-3543#[00m:#[01;34m~#[00m$
#[K#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ #[K#]0;pratik@pratik-Inspiron-3543:
~##[01;32mpratik@pratik-Inspiron-3543#[00m:#[01;34m~#[00m$ #[K#]0;pratik@pratik-
Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-3543#[00m:#[01;34m~#[00m$
#[K#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ #[K#]0;pratik@pratik-Inspiron-3543:
~##[01;32mpratik@pratik-Inspiron-3543#[00m:#[01;34m~#[00m$ #[K#]0;pratik@pratik-
Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-3543#[00m:#[01;34m~#[00m$
#[K#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ #[K#]0;pratik@pratik-Inspiron-3543:
~##[01;32mpratik@pratik-Inspiron-3543#[00m:#[01;34m~#[00m$ #[K#]0;pratik@pratik-
Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-3543#[00m:#[01;34m~#[00m$
#[K#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ #[K#]0;pratik@pratik-Inspiron-3543:
~##[01;32mpratik@pratik-Inspiron-3543#[00m:#[01;34m~#[00m$ #[K#]0;pratik@pratik-
Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-3543#[00m:#[01;34m~#[00m$
#[K#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ #[K#]0;pratik@pratik-Inspiron-3543:
~##[01;32mpratik@pratik-Inspiron-3543#[00m:#[01;34m~#[00m$ #[K#]0;pratik@pratik-
Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-3543#[00m:#[01;34m~#[00m$
#[K#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ #[K#]0;pratik@pratik-Inspiron-3543:
~##[01;32mpratik@pratik-Inspiron-3543#[00m:#[01;34m~#[00m$ #[K#]0;pratik@pratik-
Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-3543#[00m:#[01;34m~#[00m$
yhrr##[K##[K##[K##[K#grep##[K##[K##[K##[K #[K#]0;pratik@pratik-Inspiron-3543:
~##[01;32mpratik@pratik-Inspiron-3543#[00m:#[01;34m~#[00m$ #[K#]0;pratik@pratik-
Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-3543#[00m:#[01;34m~#[00m$
#[K#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ #[K#]0;pratik@pratik-Inspiron-3543:
~##[01;32mpratik@pratik-Inspiron-3543#[00m:#[01;34m~#[00m$ #[K#]0;pratik@pratik-
Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-3543#[00m:#[01;34m~#[00m$
#[K#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ #[K#]0;pratik@pratik-Inspiron-3543:
~##[01;32mpratik@pratik-Inspiron-3543#[00m:#[01;34m~#[00m$ #[K#]0;pratik@pratik-
Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-3543#[00m:#[01;34m~#[00m$
#[K#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ skkd##[K##[K##[K##[Kcat>##
t>###[C##[1P>###[1P>###[1P># >##[C##[K##[K##[K#cat >test1
HELLO # #! I am PRATIK YADAV#]0;pratik@pratik-Inspiron-3543:
~##[01;32mpratik@pratik-Inspiron-3543#[00m:#[01;34m~#[00m$ cat >test2
I have # ## ## ## ## ## ## #My Roll NO.is UE173075
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ cat
>>test1,test2##[K##[K##[K##[K##[K##[K##[K##[K##[K##[K##[K##[K##[Ktest1>>test2
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ cat test2
My Roll NO.is UE173075
HELLO! I am PRATIK YADAV#]0;pratik@pratik-Inspiron-3543:
~##[01;32mpratik@pratik-Inspiron-3543#[00m:#[01;34m~#[00m$ cat test1>test2
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ cat test2
HELLO! I am PRATIK YADAV#]0;pratik@pratik-Inspiron-3543:
~##[01;32mpratik@pratik-Inspiron-3543#[00m:#[01;34m~#[00m$ echo "Hello
World""##[K
Hello World
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ man echo
#[?1049h#[22;0;0t#[?1h#= ECHO(1) User Commands
ECHO(1)#[m
#[m
#[1mNAME#[0m#[m
echo - display a line of text#[m
#[m
#[1mSYNOPSIS#[0m#[m
#[1mecho#[0m [#[4mSHORT-OPTION#[24m]... [#[4mSTRING#[24m]...#[m
#[1mecho#[0m #[4mLONG-OPTION#[24m#[m
#[m
#[1mDESCRIPTION#[0m#[m
Echo the STRING(s) to standard output.#[m
#[m
#[1m-n#[0m do not output the trailing newline#[m
#[m
#[1m-e#[0m enable interpretation of backslash escapes#[m
#[m
#[1m-E#[0m disable interpretation of backslash escapes (default)#[m
#[m
#[1m--help#[0m display this help and exit#[m
#[m
#[1m--version#[0m#[m
output version information and exit#[m
#[m
If #[1m-e#[0m is in effect, the following sequences are recognized:#[m
#[m
\\ backslash#[m
#[m
\a alert (BEL)#[m
#[m
\b backspace#[m
#[m
\c produce no further output#[m
#[m
\e escape#[m
#[m
\f form feed#[m
#[m
#[7m Manual page echo(1) line 1 (press h for help or q to quit)#[27m#[K #[K
#[KESC###ESC#[KO#O#[KA#A #[K# #[K#[7m Manual page echo(1) line 1 (press h for
help or q to quit)#[27m#[K #[K #[KESC###ESC#[KO#O#[KA#A #[K# #[K#[7m Manual page
echo(1) line 1 (press h for help or q to quit)#[27m#[K #[K
#[KESC###ESC#[KO#O#[KA#A #[K# #[K#[7m Manual page echo(1) line 1 (press h for
help or q to quit)#[27m#[K #[K #[KESC###ESC#[KO#O#[KA#A #[K# #[K#[7m Manual page
echo(1) line 1 (press h for help or q to quit)#[27m#[K #[K
#[KESC###ESC#[KO#O#[KA#A #[K# #[K#[7m Manual page echo(1) line 1 (press h for
help or q to quit)#[27m#[K #[K #[KESC###ESC#[KO#O#[KA#A #[K# #[K#[7m Manual page
echo(1) line 1 (press h for help or q to quit)#[27m#[K #[K
#[KESC###ESC#[KO#O#[KA#A #[K# #[K#[7m Manual page echo(1) line 1 (press h for
help or q to quit)#[27m#[K #[K #[KESC###ESC#[KO#O#[KA#A #[K# #[K#[7m Manual page
echo(1) line 1 (press h for help or q to quit)#[27m#[K #[K
#[KESC###ESC#[KO#O#[KA#A #[K# #[K#[7m Manual page echo(1) line 1 (press h for
help or q to quit)#[27m#[K #[K #[KESC###ESC#[KO#O#[KA#A #[K# #[K#[7m Manual page
echo(1) line 1 (press h for help or q to quit)#[27m#[K #[K
#[KESC###ESC#[KO#O#[KA#A #[K# #[K#[7m Manual page echo(1) line 1 (press h for
help or q to quit)#[27m#[K #[K #[KESC###ESC#[KO#O#[KA#A #[K# #[K#[7m Manual page
echo(1) line 1 (press h for help or q to quit)#[27m#[K #[K
#[KESC###ESC#[KO#O#[KA#A #[K# #[K#[7m Manual page echo(1) line 1 (press h for
help or q to quit)#[27m#[K #[K #[KESC###ESC#[KO#O#[KA#A #[K# #[K#[7m Manual page
echo(1) line 1 (press h for help or q to quit)#[27m#[K #[K
#[KESC###ESC#[KO#O#[KA#A #[K# #[K#[7m Manual page echo(1) line 1 (press h for
help or q to quit)#[27m#[K #[K #[KESC###ESC#[KO#O#[KA#A #[K# #[K#[7m Manual page
echo(1) line 1 (press h for help or q to quit)#[27m#[K #[K
#[KESC###ESC#[KO#O#[KA#A #[K# #[K#[7m Manual page echo(1) line 1 (press h for
help or q to quit)#[27m#[K #[K #[KESC###ESC#[KO#O#[KA#A #[K# #[K#[7m Manual page
echo(1) line 1 (press h for help or q to quit)#[27m#[K #[K
#[KESC###ESC#[KO#O#[KA#A #[K# #[K#[7m Manual page echo(1) line 1 (press h for
help or q to quit)#[27m#[K #[K #[KESC###ESC#[KO#O#[KA#A #[K# #[K#[7m Manual page
echo(1) line 1 (press h for help or q to quit)#[27m#[K #[K
#[KESC###ESC#[KO#O#[KA#A #[K# #[K#[7m Manual page echo(1) line 1 (press h for
help or q to quit)#[27m#[K #[K #[KESC###ESC#[KO#O#[KA#A #[K# #[K#[7m Manual page
echo(1) line 1 (press h for help or q to quit)#[27m#[K #[K
#[KESC###ESC#[KO#O#[KA#A #[K# #[K#[7m Manual page echo(1) line 1 (press h for
help or q to quit)#[27m#[K #[K #[KESC###ESC#[KO#O#[KA#A #[K# #[K#[7m Manual page
echo(1) line 1 (press h for help or q to quit)#[27m#[K #[K
#[KESC###ESC#[KO#O#[KA#A #[K# #[K#[7m Manual page echo(1) line 1 (press h for
help or q to quit)#[27m#[K #[K #[KESC###ESC#[KO#O#[KA#A #[K# #[K#[7m Manual page
echo(1) line 1 (press h for help or q to quit)#[27m#[K #[K
#[KESC###ESC#[KO#O#[KA#A #[K# #[K#[7m Manual page echo(1) line 1 (press h for
help or q to quit)#[27m#[K #[K #[KESC###ESC#[KO#O#[KA#A #[K# #[K#[7m Manual page
echo(1) line 1 (press h for help or q to quit)#[27m#[K #[K
#[KESC###ESC#[KO#O#[KA#A #[K# #[K#[7m Manual page echo(1) line 1 (press h for
help or q to quit)#[27m#[K #[K #[KESC###ESC#[KO#O#[KA#A #[K# #[K#[7m Manual page
echo(1) line 1 (press h for help or q to quit)#[27m#[K #[K
#[KESC###ESC#[KO#O#[KA#A #[K# #[K#[7m Manual page echo(1) line 1 (press h for
help or q to quit)#[27m#[K #[K #[KESC###ESC#[KO#O#[KA#A #[K# #[K#[7m Manual page
echo(1) line 1 (press h for help or q to quit)#[27m#[K #[K
#[KESC###ESC#[KO#O#[KA#A #[K# #[K#[7m Manual page echo(1) line 1 (press h for
help or q to quit)#[27m#[K #[K #[KESC###ESC#[KO#O#[KA#A #[K# #[K#[7m Manual page
echo(1) line 1 (press h for help or q to quit)#[27m#[K #[K
#[KESC###ESC#[KO#O#[KA#A #[K# #[K#[7m Manual page echo(1) line 1 (press h for
help or q to quit)#[27m#[K #[K #[KESC###ESC#[KO#O#[KA#A #[K# #[K#[7m Manual page
echo(1) line 1 (press h for help or q to quit)#[27m#[K# #[K#[7m Manual page
echo(1) line 1 (press h for help or q to quit)#[27m#[K #[K#[?1l#>#[?
1049l#[23;0;0t#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ echo -n
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ echo -n test1
test1#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ echo
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ echo -e " ##[KI am Pratik Yadav"
I am Pratik Yadav
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ echu##[Ko -e"I/##[K /bam
/b####[1P/b####[C##[1P/b###[C##[1Pb#\b#######[1Pbam\b#####\bam\b######[C#[C m\
b####[C###[C##[1Pm\b####[C \b###[C#[CPray##[Ktik \bYda##[K##[Kadav"
-eI \bam \bPratik \bYadav
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ echo -e"I \bam \bPratik \bYadav"
-eI \bam \bPratik \bYadav
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ -eI \bam \bPratik \bYadav
-eI: command not found
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ echo -e "I am Pratik Yadav"##################[C#[1@\
##[1P#[1@\#[1@b#[C#[C#[C#[1@\#[1@b#[C#[C#[C#[C#[C#[C#[C\
Yadav"######bYadav"#######[C#[C#[C#[C#[C
I #am #Pratik #Yadav
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ echo -e"## e"###[C##[1P"###[1P"#e"# "##[CI am pratik
yadav#####\yadav#####nyadav################[1@0##[1P#[C#[1@\
#[1@n#######[C#[1@n##[1P#[1@\#[1@t######[C#[1@\
#[1@v#[C#[C#[C#[C#[C#[C#[C#[C#[C#[C#[C#[C#[C#[C#[C#[C#[C#[C#[C#[C#[C#[C#[C#####"
#I am
pratik
yadav
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ echo -n "I am Pratik Yafa##[K##[Kdav'##[K"
I am Pratik Yadav#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-
Inspiron-3543#[00m:#[01;34m~#[00m$ man echo
#[?1049h#[22;0;0t#[?1h#= ECHO(1) User Commands
ECHO(1)#[m
#[m
#[1mNAME#[0m#[m
echo - display a line of text#[m
#[m
#[1mSYNOPSIS#[0m#[m
#[1mecho#[0m [#[4mSHORT-OPTION#[24m]... [#[4mSTRING#[24m]...#[m
#[1mecho#[0m #[4mLONG-OPTION#[24m#[m
#[m
#[1mDESCRIPTION#[0m#[m
Echo the STRING(s) to standard output.#[m
#[m
#[1m-n#[0m do not output the trailing newline#[m
#[m
#[1m-e#[0m enable interpretation of backslash escapes#[m
#[m
#[1m-E#[0m disable interpretation of backslash escapes (default)#[m
#[m
#[1m--help#[0m display this help and exit#[m
#[m
#[1m--version#[0m#[m
output version information and exit#[m
#[m
If #[1m-e#[0m is in effect, the following sequences are recognized:#[m
#[m
\\ backslash#[m
#[m
\a alert (BEL)#[m
#[m
\b backspace#[m
#[m
\c produce no further output#[m
#[m
\e escape#[m
#[m
\f form feed#[m
#[m
#[7m Manual page echo(1) line 1 (press h for help or q to quit)#[27m#[K #[K
\n new line#[m
#[7m Manual page echo(1) line 2 (press h for help or q to quit)#[27m#[K #[K#[?
1l#>#[?1049l#[23;0;0t#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-
Inspiron-3543#[00m:#[01;34m~#[00m$ man echo | wc-c
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ man echo | wc
77 230 2058
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ man eco \##[K\##[K| wc -c
No manual entry for eco
0
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ man echo | wc -c
2058
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ man echo | wc -l
77
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ man echo |wc -b
wc: invalid option -- 'b'
Try 'wc --help' for more information.
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ man echo | wc -b
wc: invalid option -- 'b'
Try 'wc --help' for more information.
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ man echo | wc -w
230
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ man echo \##[K| tee##[K##[K##[Kwc -c test1
24 test1
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ man ##[K##[K##[K##[K#wc -c test1
24 test1
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ cat test1
HELLO! I am PRATIK YADAV#]0;pratik@pratik-Inspiron-3543:
~##[01;32mpratik@pratik-Inspiron-3543#[00m:#[01;34m~#[00m$ wc -
l##[K##[K##[K##[K##[K########cat test1##########[2@wc -
c#[C#[C#[C#[C#[C#[C########[1P test1######l test1######
0 test1
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ wc -l test1#########[1P#[1@-#[C##[1P test1######w
test1######
5 test1
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ who ##[Kis##[K##[K
pratik :0 2019-02-04 09:08 (:0)
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ whoami##[K##[K##[K am i
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ whi##[Koami
pratik
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ who | wc -l
1
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ who \##[K| wc -w
5
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ whoami | wc -w
1
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ whoami | wc -w##[Kc
7
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ who | wc-##[K -l | tee test2
1
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ cat tets##[K##[Kst2
1
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ who,whoami##[K##[K##[K##[K##[K##[K##[K;whoami
pratik :0 2019-02-04 09:08 (:0)
pratik
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ who ##[K##[K##[K##[Kwho;whoami########[1Pwhoami######|
whoami###### whoami#########[1@
pratik
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ whatis | tyep##[K##[K##[K##[K##[K##[K##[K
whatis what?
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ what ##[Kis test1
test1: nothing appropriate.
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ type test1
bash: type: test1: not found
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ whatis tets##[K##[Kst2
test2: nothing appropriate.
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ type tesr##[Kt2
bash: type: test2: not found
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ whatus##[K##[Kis /home/pratik
/home/pratik: nothing appropriate.
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ type ls
ls is aliased to `ls --color=auto'
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ type -a ls
ls is aliased to `ls --color=auto'
ls is /bin/ls
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ whatsi##[K##[Kis ls
ls (1) - list directory contents
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ whwer##[K##[K##[K##[K##[Kwhatis echo
echo (1) - display a line of text
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ type echo
echo is a shell builtin
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ where echo
where: command not found
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ find echo
find: ‘echo’: No such file or directory
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ whwerw##[K##[K##[K##[Kereis echo
echo: /bin/echo /usr/share/man/man1/echo.1.gz
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ find test1
test1
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ find pratik
find: ‘pratik’: No such file or directory
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ find desto##[K##[K##[K##[K##[KDesktop
Desktop
Desktop/mozilla.pdf
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ man echo
#[?1049h#[22;0;0t#[?1h#= ECHO(1) User Commands
ECHO(1)#[m
#[m
#[1mNAME#[0m#[m
echo - display a line of text#[m
#[m
#[1mSYNOPSIS#[0m#[m
#[1mecho#[0m [#[4mSHORT-OPTION#[24m]... [#[4mSTRING#[24m]...#[m
#[1mecho#[0m #[4mLONG-OPTION#[24m#[m
#[m
#[1mDESCRIPTION#[0m#[m
Echo the STRING(s) to standard output.#[m
#[m
#[1m-n#[0m do not output the trailing newline#[m
#[m
#[1m-e#[0m enable interpretation of backslash escapes#[m
#[m
#[1m-E#[0m disable interpretation of backslash escapes (default)#[m
#[m
#[1m--help#[0m display this help and exit#[m
#[m
#[1m--version#[0m#[m
output version information and exit#[m
#[m
If #[1m-e#[0m is in effect, the following sequences are recognized:#[m
#[m
\\ backslash#[m
#[m
\a alert (BEL)#[m
#[m
\b backspace#[m
#[m
\c produce no further output#[m
#[m
\e escape#[m
#[m
\f form feed#[m
#[m
#[7m Manual page echo(1) line 1 (press h for help or q to quit)#[27m#[K #[K#[?
1l#>#[?1049l#[23;0;0t#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-
Inspiron-3543#[00m:#[01;34m~#[00m$ whatsi##[K##[Kis ls
ls (1) - list directory contents
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ l##[Kman ls
#[?1049h#[22;0;0t#[?1h#= LS(1) User Commands
LS(1)#[m
#[m
#[1mNAME#[0m#[m
ls - list directory contents#[m
#[m
#[1mSYNOPSIS#[0m#[m
#[1mls#[0m [#[4mOPTION#[24m]... [#[4mFILE#[24m]...#[m
#[m
#[1mDESCRIPTION#[0m#[m
List information about the FILEs (the current directory by#[m
default). Sort entries alphabetically if none of #[1m-cftuvSUX#[0m#[m
nor #[1m--sort#[0m is specified.#[m
#[m
Mandatory arguments to long options are mandatory for short#[m
options too.#[m
#[m
#[1m-a#[0m, #[1m--all#[0m#[m
do not ignore entries starting with .#[m
#[m
#[1m-A#[0m, #[1m--almost-all#[0m#[m
do not list implied . and ..#[m
#[m
#[1m--author#[0m#[m
with #[1m-l#[0m, print the author of each file#[m
#[m
#[1m-b#[0m, #[1m--escape#[0m#[m
print C-style escapes for nongraphic characters#[m
#[m
#[1m--block-size#[0m=#[4mSIZE#[24m#[m
scale sizes by SIZE before printing them; e.g.,#[m
'--block-size=M' prints sizes in units of 1,048,576#[m
bytes; see SIZE format below#[m
#[m
#[1m-B#[0m, #[1m--ignore-backups#[0m#[m
do not list implied entries ending with ~#[m
#[m
#[1m-c#[0m with #[1m-lt#[0m: sort by, and show, ctime (time of last
mod‐#[m
#[7m Manual page ls(1) line 1 (press h for help or q to quit)#[27m#[K #[K#[?
1l#>#[?1049l#[23;0;0t#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-
Inspiron-3543#[00m:#[01;34m~#[00m$ cp tes##[K##[K##[K##[K##[K##[Kcat test1
HELLO! I am PRATIK YADAV#]0;pratik@pratik-Inspiron-3543:
~##[01;32mpratik@pratik-Inspiron-3543#[00m:#[01;34m~#[00m$ car##[Kt test2
1
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ cp test1 test2
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ cat test2
HELLO! I am PRATIK YADAV#]0;pratik@pratik-Inspiron-3543:
~##[01;32mpratik@pratik-Inspiron-3543#[00m:#[01;34m~#[00m$ cmp
test1##[K##[K##[K##[K##[K##[K##[K##[K##[K#ls Desktop
mozilla.pdf
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ ls Downloads
'08_chapter 1(1).pdf'
'09_chapter 2(1).pdf'
'11_chapter 4.pdf'
'avatar.2009.1080p.bluray.x264 AMIABLE whole movie formated.ass'
'avatar.(3668451).nfo'
#[0m#[01;32mbig_oh_theta.ppt#[0m
chapter-2-theory-of-demand-and-supply-part-1.pdf
#[01;34m'Ek Ladki Ko Dekha Toh Aisa Laga (2019) pdvdrip
[www.Fullmaza.me].mkv'#[0m#[K
#[01;31m'Ek Ladki Ko Dekha Toh Aisa Laga (2019) pdvdrip
[www.Fullmaza.me].mkv.zip'#[0m#[K
Fortinet_CA_SSL.crt
#[01;35m'Game.of.Thrones.S03E04.And.Now.His.Watch.Is.Ended.720p.Hin-
Eng.BluRay.x264-KatmovieHD.Pw(1).mkv'#[0m#[K
#[01;31m'game.of.thrones.s06.e07.the.broken.man.(2016).eng.1cd.
(6649176).zip'#[0m
#[01;31m'game.of.thrones.s06.e08.no.one.(2016).eng.1cd.(6656188).zip'#[0m
'game.of.thrones.the.winds.of.(6668875).nfo'
#[01;34midea-IU-182.4892.20#[0m
Invoice5508830990.pdf
IRI-PNR#273-6766216
#[01;34mjdk1.8.0_191#[0m
La.La.Land.2016.BRRip.XviD.MP3-RARBG.srt
#[01;32mLNm1.pdf#[0m
mozilla.pdf
'New Doc 2019-01-19 22.03.55_1.pdf'
'New Doc 2019-01-19 22.03.55_2(1)(1).doc'
'New Doc 2019-01-19 22.03.55_2(1).doc'
'New Doc 2019-01-19 22.03.55_2(1).pdf'
'New Doc 2019-01-19 22.03.55_2.pdf'
'New Doc 2019-01-19 22.41.25_1-ilovepdf-compressed.pdf'
'New Doc 2019-01-19 22.41.25_1.pdf'
'[N._Gregory_Mankiw]_Principles_of_Microeconomics,_(BookZZ.org).pdf'
#[01;32mQBm1.pdf#[0m
#[01;31mvirtualbox-5.2_5.2.16-123759~Ubuntu~bionic_amd64.deb#[0m
#]0;pratik@pratik-Inspiron-3543: ~##[01;32mpratik@pratik-Inspiron-
3543#[00m:#[01;34m~#[00m$ l##[Kfind Downloads
Downloads
Downloads/11_chapter 4.pdf
Downloads/New Doc 2019-01-19 22.03.55_1.pdf
Downloads/mozilla.pdf
Downloads/QBm1.pdf
Downloads/avatar.2009.1080p.bluray.x264 AMIABLE whole movie formated.ass
Downloads/virtualbox-5.2_5.2.16-123759~Ubuntu~bionic_amd64.deb
Downloads/Ek Ladki Ko Dekha Toh Aisa Laga (2019) pdvdrip
[www.Fullmaza.me].mkv.zip
Downloads/game.of.thrones.the.winds.of.(6668875).nfo
Downloads/[N._Gregory_Mankiw]_Principles_of_Microeconomics,_(BookZZ.org).pdf
Downloads/New Doc 2019-01-19 22.41.25_1.pdf
Downloads/09_chapter 2(1).pdf
Downloads/New Doc 2019-01-19 22.41.25_1-ilovepdf-compressed.pdf
Downloads/idea-IU-182.4892.20
Downloads/idea-IU-182.4892.20/plugins
Downloads/idea-IU-182.4892.20/plugins/weblogicIntegration
Downloads/idea-IU-182.4892.20/plugins/weblogicIntegration/lib
Downloads/idea-IU-182.4892.20/plugins/weblogicIntegration/lib/jps
Downloads/idea-IU-182.4892.20/plugins/weblogicIntegration/lib/jps/weblogic-jps-
plugin.jar
Downloads/idea-IU-182.4892.20/plugins/weblogicIntegration/lib/specifics
Downloads/idea-IU-182.4892.20/plugins/weblogicIntegration/lib/specifics/
weblogicSpecifics.jar
Downloads/idea-IU-182.4892.20/plugins/weblogicIntegration/lib/
weblogicIntegration.jar
Downloads/idea-IU-182.4892.20/plugins/weblogicIntegration/lib/resources_en.jar
Downloads/idea-IU-182.4892.20/plugins/cucumber-groovy
Downloads/idea-IU-182.4892.20/plugins/cucumber-groovy/lib
Downloads/idea-IU-182.4892.20/plugins/cucumber-groovy/lib/cucumber-groovy.jar
Downloads/idea-IU-182.4892.20/plugins/cucumber-groovy/lib/cucumber-core-
1.2.4.jar
Downloads/idea-IU-182.4892.20/plugins/cucumber-groovy/lib/cucumber-groovy-
1.2.4.jar
Downloads/idea-IU-182.4892.20/plugins/Jetty
Downloads/idea-IU-182.4892.20/plugins/Jetty/lib
Downloads/idea-IU-182.4892.20/plugins/Jetty/lib/jettyIntegration.jar
Downloads/idea-IU-182.4892.20/plugins/Spring
Downloads/idea-IU-182.4892.20/plugins/Spring/lib
Downloads/idea-IU-182.4892.20/plugins/Spring/lib/spring-aop.jar
Downloads/idea-IU-182.4892.20/plugins/Spring/lib/spring-graph.jar
Downloads/idea-IU-182.4892.20/plugins/Spring/lib/spring-el.jar
Downloads/idea-IU-182.4892.20/plugins/Spring/lib/customNs
Downloads/idea-IU-182.4892.20/plugins/Spring/lib/customNs/customNs.jar
Downloads/idea-IU-182.4892.20/plugins/Spring/lib/spring.jar
Downloads/idea-IU-182.4892.20/plugins/Spring/lib/spring-jsf.jar
Downloads/idea-IU-182.4892.20/plugins/Spring/lib/spring-eclipse.jar
Downloads/idea-IU-182.4892.20/plugins/Spring/lib/spring-persistence-
integration.jar
Downloads/idea-IU-182.4892.20/plugins/Spring/lib/spring-web.jar
Downloads/idea-IU-182.4892.20/plugins/dmServer
Downloads/idea-IU-182.4892.20/plugins/dmServer/lib
Downloads/idea-IU-182.4892.20/plugins/dmServer/lib/dmServerSupport.jar
Downloads/idea-IU-182.4892.20/plugins/dmServer/lib/dmServer-jps-plugin.jar
Downloads/idea-IU-182.4892.20/plugins/dmServer/lib/
com.springsource.server.management.remote-1.0.0.RELEASE.jar
Downloads/idea-IU-182.4892.20/plugins/cloudFoundryIntegration
Downloads/idea-IU-182.4892.20/plugins/cloudFoundryIntegration/lib
Downloads/idea-IU-182.4892.20/plugins/cloudFoundryIntegration/lib/
cloudFoundryIntegration.jar
Downloads/idea-IU-182.4892.20/plugins/cloudFoundryIntegration/lib/specifics
Downloads/idea-IU-182.4892.20/plugins/cloudFoundryIntegration/lib/specifics/
cloudFoundrySpecifics.jar
Downloads/idea-IU-182.4892.20/plugins/JavaScriptDebugger
Downloads/idea-IU-182.4892.20/plugins/JavaScriptDebugger/lib
Downloads/idea-IU-182.4892.20/plugins/JavaScriptDebugger/lib/
JavaScriptDebugger.jar
Downloads/idea-IU-182.4892.20/plugins/JavaScriptDebugger/lib/
FirefoxConnector.jar
Downloads/idea-IU-182.4892.20/plugins/JavaScriptDebugger/lib/ChromeConnector.jar
Downloads/idea-IU-182.4892.20/plugins/JavaScriptDebugger/lib/
JavaEEJavaScriptDebug.jar
Downloads/idea-IU-182.4892.20/plugins/JavaScriptDebugger/lib/resources_en.jar
Downloads/idea-IU-182.4892.20/plugins/JavaScriptDebugger/lib/nashorn-debugger-
rt.jar
Downloads/idea-IU-182.4892.20/plugins/JavaScriptDebugger/lib/nashorn-
debugger.jar
Downloads/idea-IU-182.4892.20/plugins/JavaScriptDebugger/extensions
Downloads/idea-IU-182.4892.20/plugins/JavaScriptDebugger/extensions/jb.xpi
Downloads/idea-IU-182.4892.20/plugins/stream-debugger
Downloads/idea-IU-182.4892.20/plugins/stream-debugger/lib
Downloads/idea-IU-182.4892.20/plugins/stream-debugger/lib/stream-debugger.jar
Downloads/idea-IU-182.4892.20/plugins/coverage
Downloads/idea-IU-182.4892.20/plugins/coverage/lib
Downloads/idea-IU-182.4892.20/plugins/coverage/lib/jacocoant.jar
Downloads/idea-IU-182.4892.20/plugins/coverage/lib/jacocoagent.jar
Downloads/idea-IU-182.4892.20/plugins/coverage/lib/coverage.jar
Downloads/idea-IU-182.4892.20/plugins/coverage/lib/coverage-report-idea.jar
Downloads/idea-IU-182.4892.20/plugins/coverage/lib/freemarker.jar
Downloads/idea-IU-182.4892.20/plugins/coverage/lib/coverage_rt.jar
Downloads/idea-IU-182.4892.20/plugins/coverage/lib/coverage-report.jar
Downloads/idea-IU-182.4892.20/plugins/DatabaseTools
Downloads/idea-IU-182.4892.20/plugins/DatabaseTools/lib
Downloads/idea-IU-182.4892.20/plugins/DatabaseTools/lib/dekaf-single-
2.0.0.372.jar
Downloads/idea-IU-182.4892.20/plugins/DatabaseTools/lib/database-openapi.jar
Downloads/idea-IU-182.4892.20/plugins/DatabaseTools/lib/unidecode-0.0.7.jar
Downloads/idea-IU-182.4892.20/plugins/DatabaseTools/lib/database-impl.jar
Downloads/idea-IU-182.4892.20/plugins/DatabaseTools/lib/resources_en.jar
Downloads/idea-IU-182.4892.20/plugins/DatabaseTools/lib/jdbc-console.jar
Downloads/idea-IU-182.4892.20/plugins/thymeleaf
Downloads/idea-IU-182.4892.20/plugins/thymeleaf/lib
Downloads/idea-IU-182.4892.20/plugins/thymeleaf/lib/resources_en.jar
Downloads/idea-IU-182.4892.20/plugins/thymeleaf/lib/thymeleaf-support.jar
Downloads/idea-IU-182.4892.20/plugins/RefactorX
Downloads/idea-IU-182.4892.20/plugins/RefactorX/lib
Downloads/idea-IU-182.4892.20/plugins/RefactorX/lib/RefactorX.jar
Downloads/idea-IU-182.4892.20/plugins/RefactorX/lib/resources_en.jar
Downloads/idea-IU-182.4892.20/plugins/jsr45debug
Downloads/idea-IU-182.4892.20/plugins/jsr45debug/lib
Downloads/idea-IU-182.4892.20/plugins/jsr45debug/lib/resources_en.jar
Downloads/idea-IU-182.4892.20/plugins/jsr45debug/lib/jsr45debug.jar
Downloads/idea-IU-182.4892.20/plugins/SpringWebServices
Downloads/idea-IU-182.4892.20/plugins/SpringWebServices/lib
Downloads/idea-IU-182.4892.20/plugins/SpringWebServices/lib/
SpringWebServices.jar
Downloads/idea-IU-182.4892.20/plugins/SpringWebServices/lib/resources_en.jar
Downloads/idea-IU-182.4892.20/plugins/Velocity
Downloads/idea-IU-182.4892.20/plugins/Velocity/lib
Downloads/idea-IU-182.4892.20/plugins/Velocity/lib/core.jar
Downloads/idea-IU-182.4892.20/plugins/Velocity/lib/resources_en.jar
Downloads/idea-IU-182.4892.20/plugins/resinIntegration
Downloads/idea-IU-182.4892.20/plugins/resinIntegration/lib
Downloads/idea-IU-182.4892.20/plugins/resinIntegration/lib/resin.jar
Downloads/idea-IU-182.4892.20/plugins/resinIntegration/lib/resources_en.jar
Downloads/idea-IU-182.4892.20/plugins/GwtStudio
Downloads/idea-IU-182.4892.20/plugins/GwtStudio/lib
Downloads/idea-IU-182.4892.20/plugins/GwtStudio/lib/runtime.jar
Downloads/idea-IU-182.4892.20/plugins/GwtStudio/lib/gwt-jps-plugin.jar
Downloads/idea-IU-182.4892.20/plugins/GwtStudio/lib/sdm-launcher
Downloads/idea-IU-182.4892.20/plugins/GwtStudio/lib/sdm-launcher/superdevmode-
launcher-legacy.jar
Downloads/idea-IU-182.4892.20/plugins/GwtStudio/lib/GwtStudio.jar
Downloads/idea-IU-182.4892.20/plugins/GwtStudio/lib/resources_en.jar
Downloads/idea-IU-182.4892.20/plugins/javaFX
Downloads/idea-IU-182.4892.20/plugins/javaFX/lib
Downloads/idea-IU-182.4892.20/plugins/javaFX/lib/javaFX-jps-plugin.jar
Downloads/idea-IU-182.4892.20/plugins/javaFX/lib/SceneBuilderKit-8.2.0.jar
Downloads/idea-IU-182.4892.20/plugins/javaFX/lib/common-javaFX-plugin.jar
Downloads/idea-IU-182.4892.20/plugins/javaFX/lib/javaFX.jar
Downloads/idea-IU-182.4892.20/plugins/javaFX/lib/resources_en.jar
Downloads/idea-IU-182.4892.20/plugins/cucumber-java
Downloads/idea-IU-182.4892.20/plugins/cucumber-java/lib
Downloads/idea-IU-182.4892.20/plugins/cucumber-java/lib/cucumber-java.jar
Downloads/idea-IU-182.4892.20/plugins/cucumber-java/lib/cucumber-
jvmFormatter3.jar
Downloads/idea-IU-182.4892.20/plugins/cucumber-java/lib/cucumber-core-1.2.4.jar
Downloads/idea-IU-182.4892.20/plugins/cucumber-java/lib/gherkin-2.12.2.jar
Downloads/idea-IU-182.4892.20/plugins/cucumber-java/lib/cucumber-
jvmFormatter.jar
Downloads/idea-IU-182.4892.20/plugins/uml
Downloads/idea-IU-182.4892.20/plugins/uml/lib
Downloads/idea-IU-182.4892.20/plugins/uml/lib/uml-support.jar
Downloads/idea-IU-182.4892.20/plugins/uml/lib/diagram-api.jar
Downloads/idea-IU-182.4892.20/plugins/openShiftIntegration
Downloads/idea-IU-182.4892.20/plugins/openShiftIntegration/lib
Downloads/idea-IU-182.4892.20/plugins/openShiftIntegration/lib/
openShiftIntegration.jar
Downloads/idea-IU-182.4892.20/plugins/openShiftIntegration/lib/specifics
Downloads/idea-IU-182.4892.20/plugins/openShiftIntegration/lib/specifics/
openShiftSpecifics.jar
Downloads/idea-IU-182.4892.20/plugins/asp
Downloads/idea-IU-182.4892.20/plugins/asp/lib
Downloads/idea-IU-182.4892.20/plugins/asp/lib/asp.jar
Downloads/idea-IU-182.4892.20/plugins/asp/lib/resources_en.jar
Downloads/idea-IU-182.4892.20/plugins/SeamNavigation
Downloads/idea-IU-182.4892.20/plugins/SeamNavigation/lib
Downloads/idea-IU-182.4892.20/plugins/SeamNavigation/lib/seam-navigation.jar
Downloads/idea-IU-182.4892.20/plugins/SeamNavigation/lib/resources_en.jar
Downloads/idea-IU-182.4892.20/plugins/maven
Downloads/idea-IU-182.4892.20/plugins/maven/lib
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3-server-common.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/plexus-archiver-2.4.4.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven-server-api.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven2-server-lib
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven2-server-lib/mercury-
artifact-1.0-alpha-6.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven2-server-lib/maven-
dependency-tree-1.2.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven2-server-lib/activation-
1.1.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven2-server-lib/plexus-utils-
1.5.5.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven2-server-lib/jaxb-impl.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven2-server-lib/archetype-
common-2.0-alpha-4-SNAPSHOT.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven2-server-lib/jaxb-api.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven2-server-lib/nexus-indexer-
1.2.3.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven2-server-lib/commons-
beanutils.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3-server-lib
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3-server-lib/maven-
dependency-tree-1.2.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3-server-lib/archetype-
catalog-2.2.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3-server-lib/nexus-indexer-
artifact-1.0.1.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3-server-lib/archetype-
common-2.2.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3-server-lib/nexus-indexer-
3.0.4.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3-server-impl.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/artifact-resolver-m3.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/artifact-resolver-m31.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/lucene-core-2.4.1.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/artifact-resolver-m2.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/resources_en.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven2
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven2/lib
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven2/lib/maven-2.2.1-uber.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven2/conf
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven2/conf/settings.xml
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven2/README.txt
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven2/boot
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven2/boot/classworlds-1.1.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven2/LICENSE.txt
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven2/bin
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven2/bin/mvn
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven2/bin/mvnDebug
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven2/bin/mvn.bat
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven2/bin/m2.conf
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven2/bin/mvnDebug.bat
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven2/NOTICE.txt
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven2-server-impl.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/plexus-utils-2.0.6.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven-jps-plugin.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven30-server-impl.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3/lib
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3/lib/
org.eclipse.sisu.inject-0.3.2.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3/lib/maven-settings-
builder-3.3.9.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3/lib/maven-
settings.license
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3/lib/wagon-provider-
api.license
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3/lib/commons-io-2.2.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3/lib/slf4j-api-1.7.5.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3/lib/jsr250-api.license
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3/lib/
org.eclipse.sisu.plexus.license
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3/lib/slf4j-api.license
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3/lib/aopalliance-1.0.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3/lib/commons-lang3.license
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3/lib/maven-plugin-api-
3.3.9.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3/lib/wagon-provider-api-
2.10.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3/lib/wagon-http-shared-
2.10.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3/lib/guava-18.0.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3/lib/wagon-http-
shared.license
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3/lib/jsoup-1.7.2.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3/lib/maven-repository-
metadata.license
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3/lib/commons-lang-2.6.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3/lib/maven-aether-
provider-3.3.9.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3/lib/javax.inject-1.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3/lib/aether-api.license
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3/lib/wagon-file-2.10.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3/lib/ext
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3/lib/ext/README.txt
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3/lib/maven-model-3.3.9.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3/lib/slf4j-simple.license
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3/lib/maven-model-builder-
3.3.9.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3/lib/maven-builder-
support-3.3.9.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3/lib/plexus-sec-
dispatcher-1.3.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3/lib/maven-model-
builder.license
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3/lib/plexus-component-
annotations-1.6.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3/lib/maven-compat.license
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3/lib/aether-spi.license
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3/lib/plexus-cipher.license
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3/lib/commons-cli-1.2.jar
Downloads/idea-IU-182.4892.20/plugins/maven/lib/maven3/lib/aether-util.license
pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-Inspiron-3543[00m:
[01;34m~[00m$ who [K[K[K[Kwh[Khatis cat
cat (1) - concatenate files and print on the standard output
]0;pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-Inspiron-3543[00m:
[01;34m~[00m$ wherecat[K[K[Kis cat
cat: /bin/cat /usr/share/man/man1/cat.1.gz
]0;pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-Inspiron-3543[00m:
[01;34m~[00m$ ty[K[Kfind cat
find: : No such file or directory
]0;pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-Inspiron-3543[00m:
[01;34m~[00m$ touch test1
]0;pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-Inspiron-3543[00m:
[01;34m~[00m$ ls -ls
total 428
4 -rw-rw-r-- 1 pratik pratik 1 Jan 23 11:54 binary.cpp
16 -rwxrwxr-x 1 pratik pratik 13072 Jan 16 12:12 [0m[01;32mbinarysearch[0m
4 -rw-rw-r-- 1 pratik pratik 686 Jan 16 12:12 binarysearch.cpp
8 -rw-rw-r-- 1 pratik pratik 4136 Jan 16 12:12 binarysearch.o
4 drwxr-xr-x 2 pratik pratik 4096 Jan 28 11:00 [01;34mDesktop[0m
4 drwxr-xr-x 3 pratik pratik 4096 Aug 7 00:01 [01;34mDocuments[0m
4 drwxr-xr-x 4 pratik pratik 4096 Jan 28 11:12 [01;34mDownloads[0m
4 -rwxr-xr-x 1 pratik pratik 87 Aug 6 19:54 [01;32measytether.destop[0m
12 -rw-r--r-- 1 pratik pratik 8980 Aug 1 17:47 examples.desktop
4 -rw-r--r-- 1 pratik pratik 1355 Oct 21 10:59 HashMapCode.class
4 -rw-rw-r-- 1 pratik pratik 637 Oct 21 10:59 HashMapCode.java
4 -rw-rw-r-- 1 pratik pratik 662 Oct 21 10:42 HashMap.java
4 -rw-r--r-- 1 pratik pratik 426 Oct 19 13:13 HelloWorld.class
4 -rw-rw-r-- 1 pratik pratik 175 Oct 19 13:11 HelloWorld.java
4 drwxrwxr-x 3 pratik pratik 4096 Oct 19 09:54 [01;34mIdeaProjects[0m
4 -rw-rw-r-- 1 pratik pratik 159 Oct 21 10:28 JAVA.java
96 -rw-rw-r-- 1 pratik pratik 95497 Dec 14 16:22 mozilla.pdf
4 drwxr-xr-x 2 pratik pratik 4096 Aug 1 23:30 [01;34mMusic[0m
4 drwxr-xr-x 2 pratik pratik 4096 Jan 28 10:47 [01;34mmydir[0m
16 -rw-r--r-- 1 pratik pratik 16384 Jan 28 11:24 OSfile
4 drwxr-xr-x 2 pratik pratik 4096 Jan 25 01:03 [01;34mPictures[0m
4 drwxr-xr-x 2 pratik pratik 4096 Aug 1 23:30 [01;34mPublic[0m
16 -rwxrwxr-x 1 pratik pratik 13160 Jan 16 12:19 [01;32mquicksort2[0m
4 -rw-rw-r-- 1 pratik pratik 1115 Jan 16 12:19 quicksort2.cpp
8 -rw-rw-r-- 1 pratik pratik 4168 Jan 16 12:19 quicksort2.o
16 -rwxrwxr-x 1 pratik pratik 13296 Jan 23 11:59 [01;32mselection[0m
4 -rw-rw-r-- 1 pratik pratik 848 Jan 23 11:59 selection.cpp
8 -rw-rw-r-- 1 pratik pratik 4336 Jan 23 11:59 selection.o
4 drwxr-xr-x 3 pratik pratik 4096 Oct 18 14:02 [01;34msnap[0m
4 drwxr-xr-x 2 pratik pratik 4096 Aug 1 23:30 [01;34mTemplates[0m
40 -rwxrwxr-x 1 pratik pratik 40688 Jan 24 14:35 [01;32mtest[0m
4 -rw-r--r-- 1 pratik pratik 14 Jan 28 11:38 test1
4 -rw-r--r-- 1 pratik pratik 22 Jan 28 11:31 test2
4 -rw-r--r-- 1 pratik pratik 11 Jan 28 11:30 test3
4 -rw-rw-r-- 1 pratik pratik 1054 Jan 24 14:34 test.cpp
80 -rw-rw-r-- 1 pratik pratik 78840 Jan 24 14:35 test.o
4 -rw-r--r-- 1 root root 43 Aug 10 22:25 text
4 drwxr-xr-x 2 pratik pratik 4096 Aug 1 23:30 [01;34mVideos[0m
4 drwxrwxr-x 3 pratik pratik 4096 Aug 10 23:13 [01;34m'VirtualBox VMs'[0m
]0;pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-Inspiron-3543[00m:
[01;34m~[00m$ exit
• Cmp command in Linux/UNIX is used to compare the two files byte by byte
and helps you to find out whether the two files are identical or not.
• Comm Compares two sorted files line by line and write to standard output; the lines
that are common and the lines that are unique.
• Diff Used to display the differences in the files by comparing the files line by line.
• Whereis To find out the location of the executable, source code and man page for the
date command, type: $ whereis date
• Pipe The Pipe is a command in Linux that lets you use two or more commands such
that output of one command serves as input to the next. In short, the output of each
process directly as input to the next one like a pipeline. The symbol '|' denotes a pipe.
• Semi-colon you can put two or more commands on the same line separated by the
semicolon. All the arguments before (;) will be treated as a separate command from all
the arguments after the (;).
• Sort SORT command is used to sort a file, arranging the records in a particular order.
By default, the sort command sorts file assuming the contents are ASCII. Using options
in sort command, it can also be used to sort numerically.
OUTPUT:-
pratik@pratik-Inspiron-3543: ~/Desktop[01;32mpratik@pratik-Inspiron-3543[00m:
[01;34m~/Desktop[00m$ cd..[K[K ..
]0;pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-Inspiron-3543[00m:
[01;34m~[00m$ cat tesr[Kt> test[1@ [C[1P test[C[1Ptest> test[C[1Ptest
>test[C[C[C[C1t[1Pt[C1
sxdtcfvtgbyhujmikjmnhbgvfcdtxdcfygbh Hello
Everyone,I am Pratik Yadav .Roll No. Ue E173075^[[D^[[D^[[D 5
75^[[D
I am D doing woring king in Os S Lab]0;pratik@pratik-Inspiron-3543:
~[01;32mpratik@pratik-Inspiron-3543[00m:[01;34m~[00m$ cat test1
Hello Everyone,I am Pratik Yadav.Roll No. UE173075
I am working in OS Lab]0;pratik@pratik-Inspiron-3543: ~[01;32m
pratik@pratik-Inspiron-3543[00m:[01;34m~[00m$ cat >test [K2
H Hii,This is my 2nd File,By ths e way Ua ,Ia am Pratik.]0;
pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-Inspiron-3543[00m:
[01;34m~[00m$ cat
[K]0;
pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-Inspiron-3543[00m:
[01;34m~[00m$ cat
[K]0;
pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-Inspiron-3543[00m:
[01;34m~[00m$ cat
[K]0;
pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-Inspiron-3543[00m:
[01;34m~[00m$ cat
[K]0;
pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-Inspiron-3543[00m:
[01;34m~[00m$ cat
[K]0;
pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-Inspiron-3543[00m:
[01;34m~[00m$ cat
[K]0;pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-Inspiron-3543[00m:
[01;34m~[00m$ cat
[K]0;pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-Inspiron-3543[00m:
[01;34m~[00m$ cat test1 test2
Hello Everyone,I am Pratik Yadav.Roll No. UE173075
I am working in OS LabHii,This is my 2nd File,By the way,I am
Pratik.]0;pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-Inspiron-3543[00m:
[01;34m~[00m$ cat tse[K[Kest2 test1
Hii,This is my 2nd File,By the way,I am Pratik.Hello Everyone,I am Pratik
Yadav.Roll No. UE173075
I am working in OS Lab]0;pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-
Inspiron-3543[00m:[01;34m~[00m$ cat -n tesr[Kt1
1 Hello Everyone,I am Pratik Yadav.Roll No. UE173075
2 I am working in OS Lab]0;pratik@pratik-Inspiron-3543:
~[01;32mpratik@pratik-Inspiron-3543[00m:[01;34m~[00m$ ca[K[Kcat test1>test2
]0;pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-Inspiron-3543[00m:
[01;34m~[00m$ cat test1
Hello Everyone,I am Pratik Yadav.Roll No. UE173075
I am working in OS Lab]0;pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-
Inspiron-3543[00m:[01;34m~[00m$ cat test2
Hello Everyone,I am Pratik Yadav.Roll No. UE173075
I am working in OS Lab]0;pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-
Inspiron-3543[00m:[01;34m~[00m$ cat [K[K[K[Kcat >ttest[K[K[K[Kest2
Hi !!!!Ths is is Test ^[[1;2B 2 File !!!!!]0;pratik@pratik-Inspiron-
3543: ~[01;32mpratik@pratik-Inspiron-3543[00m:[01;34m~[00m$ cta[K[Kat
test1>>test2
]0;pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-Inspiron-3543[00m:
[01;34m~[00m$ a[Kcat test1
Hello Everyone,I am Pratik Yadav.Roll No. UE173075
I am working in OS Lab]0;pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-
Inspiron-3543[00m:[01;34m~[00m$ cat test2
!!!!This is Test 2 File !!!!!Hello Everyone,I am Pratik Yadav.Roll No. UE173075
I am working in OS Lab]0;pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-
Inspiron-3543[00m:[01;34m~[00m$ cat test3> test3[1@ [1P[C[1@
[C[C[1Ptest3[C[C[C[C[C
HU I< ,THIS IS MY THIRD FILED ]0;pratik@pratik-Inspiron-3543:
~[01;32mpratik@pratik-Inspiron-3543[00m:[01;34m~[00m$ cat test1 test3 | sort
>test2
]0;pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-Inspiron-3543[00m:
[01;34m~[00m$ cat test1
Hello Everyone,I am Pratik Yadav.Roll No. UE173075
I am working in OS Lab]0;pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-
Inspiron-3543[00m:[01;34m~[00m$ cat test2
Hello Everyone,I am Pratik Yadav.Roll No. UE173075
I am working in OS LabHI,THIS IS MY THIRD FILE
]0;pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-Inspiron-3543[00m:
[01;34m~[00m$
[K]0;pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-Inspiron-3543[00m:
[01;34m~[00m$
[K]0;pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-Inspiron-3543[00m:
[01;34m~[00m$
[K]0;pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-Inspiron-3543[00m:
[01;34m~[00m$
[K]0;pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-Inspiron-3543[00m:
[01;34m~[00m$
[K]0;pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-Inspiron-3543[00m:
[01;34m~[00m$
[K]0;pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-Inspiron-3543[00m:
[01;34m~[00m$ cat >test1
1
2
3
4
5
]0;pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-Inspiron-3543[00m:
[01;34m~[00m$ cat >test3
^[[1;2C 6
7
8
9
10
]0;pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-Inspiron-3543[00m:
[01;34m~[00m$ cat test1 test3 | sort >test2
]0;pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-Inspiron-3543[00m:
[01;34m~[00m$ cat test2
1
10
2
3
4
5
6
7
8
9
]0;pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-Inspiron-3543[00m:
[01;34m~[00m$ cat test[K[K[K[K[K >test1
5
6
9
2
4
8
5 ]0;pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-Inspiron-3543[00m:
[01;34m~[00m$ sort >test1
cat tesd t1
]0;pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-Inspiron-3543[00m:
[01;34m~[00m$ cat test1
cat test1
]0;pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-Inspiron-3543[00m:
[01;34m~[00m$ cat >test1
8
6
1
4
23 5
3
9
]0;pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-Inspiron-3543[00m:
[01;34m~[00m$ sort test1
1
3
4
5
6
8
9
]0;pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-Inspiron-3543[00m:
[01;34m~[00m$ who cat
]0;pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-Inspiron-3543[00m:
[01;34m~[00m$ type cat
cat is hashed (/bin/cat)
]0;pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-Inspiron-3543[00m:
[01;34m~[00m$ what is cat
]0;pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-Inspiron-3543[00m:
[01;34m~[00m$ who [K[K[K[Kwh[Khatis cat
cat (1) - concatenate files and print on the standard output
]0;pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-Inspiron-3543[00m:
[01;34m~[00m$ wherecat[K[K[Kis cat
cat: /bin/cat /usr/share/man/man1/cat.1.gz
]0;pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-Inspiron-3543[00m:
[01;34m~[00m$ ty[K[Kfind cat
find: : No such file or directory
]0;pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-Inspiron-3543[00m:
[01;34m~[00m$ touch test1
]0;pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-Inspiron-3543[00m:
[01;34m~[00m$ ls -ls
total 428
4 -rw-rw-r-- 1 pratik pratik 1 Jan 23 11:54 binary.cpp
16 -rwxrwxr-x 1 pratik pratik 13072 Jan 16 12:12 [0m[01;32mbinarysearch[0m
4 -rw-rw-r-- 1 pratik pratik 686 Jan 16 12:12 binarysearch.cpp
8 -rw-rw-r-- 1 pratik pratik 4136 Jan 16 12:12 binarysearch.o
4 drwxr-xr-x 2 pratik pratik 4096 Jan 28 11:00 [01;34mDesktop[0m
4 drwxr-xr-x 3 pratik pratik 4096 Aug 7 00:01 [01;34mDocuments[0m
4 drwxr-xr-x 4 pratik pratik 4096 Jan 28 11:12 [01;34mDownloads[0m
4 -rwxr-xr-x 1 pratik pratik 87 Aug 6 19:54 [01;32measytether.destop[0m
12 -rw-r--r-- 1 pratik pratik 8980 Aug 1 17:47 examples.desktop
4 -rw-r--r-- 1 pratik pratik 1355 Oct 21 10:59 HashMapCode.class
4 -rw-rw-r-- 1 pratik pratik 637 Oct 21 10:59 HashMapCode.java
4 -rw-rw-r-- 1 pratik pratik 662 Oct 21 10:42 HashMap.java
4 -rw-r--r-- 1 pratik pratik 426 Oct 19 13:13 HelloWorld.class
4 -rw-rw-r-- 1 pratik pratik 175 Oct 19 13:11 HelloWorld.java
4 drwxrwxr-x 3 pratik pratik 4096 Oct 19 09:54 [01;34mIdeaProjects[0m
4 -rw-rw-r-- 1 pratik pratik 159 Oct 21 10:28 JAVA.java
96 -rw-rw-r-- 1 pratik pratik 95497 Dec 14 16:22 mozilla.pdf
4 drwxr-xr-x 2 pratik pratik 4096 Aug 1 23:30 [01;34mMusic[0m
4 drwxr-xr-x 2 pratik pratik 4096 Jan 28 10:47 [01;34mmydir[0m
16 -rw-r--r-- 1 pratik pratik 16384 Jan 28 11:24 OSfile
4 drwxr-xr-x 2 pratik pratik 4096 Jan 25 01:03 [01;34mPictures[0m
4 drwxr-xr-x 2 pratik pratik 4096 Aug 1 23:30 [01;34mPublic[0m
16 -rwxrwxr-x 1 pratik pratik 13160 Jan 16 12:19 [01;32mquicksort2[0m
4 -rw-rw-r-- 1 pratik pratik 1115 Jan 16 12:19 quicksort2.cpp
8 -rw-rw-r-- 1 pratik pratik 4168 Jan 16 12:19 quicksort2.o
16 -rwxrwxr-x 1 pratik pratik 13296 Jan 23 11:59 [01;32mselection[0m
4 -rw-rw-r-- 1 pratik pratik 848 Jan 23 11:59 selection.cpp
8 -rw-rw-r-- 1 pratik pratik 4336 Jan 23 11:59 selection.o
4 drwxr-xr-x 3 pratik pratik 4096 Oct 18 14:02 [01;34msnap[0m
4 drwxr-xr-x 2 pratik pratik 4096 Aug 1 23:30 [01;34mTemplates[0m
40 -rwxrwxr-x 1 pratik pratik 40688 Jan 24 14:35 [01;32mtest[0m
4 -rw-r--r-- 1 pratik pratik 14 Jan 28 11:38 test1
4 -rw-r--r-- 1 pratik pratik 22 Jan 28 11:31 test2
4 -rw-r--r-- 1 pratik pratik 11 Jan 28 11:30 test3
4 -rw-rw-r-- 1 pratik pratik 1054 Jan 24 14:34 test.cpp
80 -rw-rw-r-- 1 pratik pratik 78840 Jan 24 14:35 test.o
4 -rw-r--r-- 1 root root 43 Aug 10 22:25 text
4 drwxr-xr-x 2 pratik pratik 4096 Aug 1 23:30 [01;34mVideos[0m
4 drwxrwxr-x 3 pratik pratik 4096 Aug 10 23:13 [01;34m'VirtualBox VMs'[0m
]0;pratik@pratik-Inspiron-3543: ~[01;32mpratik@pratik-Inspiron-3543[00m:
[01;34m~[00m$ exit
Script done on 2019-01-28 11:40:29+0530
PRACTICAL-5
• Adduser add user with full profile and info (pass, quota, permission, etc.)
• Useradd add user with his name only (if you want to add a temp user with only a
name,other info not required)
• Deluser deluser and delgroup remove users and groups from the system according to
command line options.
• Sudo It is a great tool for restricting access to the root account (or other accounts)
• su The Unix command su, which stands for substitute user is used by a computer user
to execute commands with the privileges of another user account
• umask The umask acts as a set of permissions that applications cannot set on files. It's
a file mode creation mask for processes and cannot be set for directories itself.
• Chmod In Unix and Unix-like operating systems, chmod is the command and system
call which is used to change the access permissions of file system objects. It is also
used to change special mode flags. The request is filtered by the umask.
• Wall displays a message, or the contents of a file, or otherwise its standard input, on
the terminals of all currently logged in users.
• Clear clear is a computer operating system command which is used to bring the
command line on top of the computer terminal
OUTPUT-:
pratik@pratik-Inspiron-3543:~$ script OSfile4
Script started, file is OSfile4
pratik@pratik-Inspiron-3543:~$ adduser Hacker007
adduser: Only root may add a user or group to the system.
pratik@pratik-Inspiron-3543:~$ sudo adduser Hacker007
[sudo] password for pratik:
adduser: Please enter a username matching the regular expression configured
via the NAME_REGEX[_SYSTEM] configuration variable. Use the `--force-badname'
option to relax this check or reconfigure NAME_REGEX.
pratik@pratik-Inspiron-3543:~$ adduser Hackerwifi
adduser: Only root may add a user or group to the system.
pratik@pratik-Inspiron-3543:~$ sudo adduser Hackerwifi
adduser: Please enter a username matching the regular expression configured
via the NAME_REGEX[_SYSTEM] configuration variable. Use the `--force-badname'
option to relax this check or reconfigure NAME_REGEX.
pratik@pratik-Inspiron-3543:~$ ^C
pratik@pratik-Inspiron-3543:~$ sudo adduser hackerwifi sudo
adduser: The user `hackerwifi' does not exist.
pratik@pratik-Inspiron-3543:~$ sudo adduser ghost sudo
The user `ghost' is already a member of `sudo'.
pratik@pratik-Inspiron-3543:~$ sudo adduser pratik sudo
The user `pratik' is already a member of `sudo'.
pratik@pratik-Inspiron-3543:~$ sudo adduser hack sudo
adduser: The user `hack' does not exist.
pratik@pratik-Inspiron-3543:~$ adduser
adduser: Only root may add a user or group to the system.
pratik@pratik-Inspiron-3543:~$ sudo adduser
adduser: Only one or two names allowed.
pratik@pratik-Inspiron-3543:~$ sudo su
root@pratik-Inspiron-3543:/home/pratik# adduser pratik007
Adding user `pratik007' ...
Adding new group `pratik007' (1002) ...
Adding new user `pratik007' (1002) with group `pratik007' ...
Creating home directory `/home/pratik007' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for pratik007
Enter the new value, or press ENTER for the default
Full Name []: PRATIK
Room Number []: 39
Work Phone []: 8619084457
Home Phone []: 8619084457
Other []:
Is the information correct? [Y/n] Y
root@pratik-Inspiron-3543:/home/pratik# useradd pratikhack
root@pratik-Inspiron-3543:/home/pratik# deluser pratikhack
Removing user `pratikhack' ...
Warning: group `pratikhack' has no more members.
Done.
root@pratik-Inspiron-3543:/home/pratik# userdel pratik007
root@pratik-Inspiron-3543:/home/pratik# umask
0022
root@pratik-Inspiron-3543:/home/pratik# cd..
cd..: command not found
root@pratik-Inspiron-3543:/home/pratik# cd ..
root@pratik-Inspiron-3543:/home# cd ..
root@pratik-Inspiron-3543:/# cd ..
root@pratik-Inspiron-3543:/# exit
exit
pratik@pratik-Inspiron-3543:~$ umask
0022
pratik@pratik-Inspiron-3543:~$ umask 077
pratik@pratik-Inspiron-3543:~$ cat >myfile1
HELLO! I am Pratik.
I am in OS LAb
I am doing umask and chmod command
pratik@pratik-Inspiron-3543:~$ ls -dl myfile1
-rw------- 1 pratik pratik 70 Feb 11 10:40 myfile1
pratik@pratik-Inspiron-3543:~$ umask -s 777
bash: umask: -s: invalid option
umask: usage: umask [-p] [-S] [mode]
pratik@pratik-Inspiron-3543:~$ umask
0077
pratik@pratik-Inspiron-3543:~$ ^C
pratik@pratik-Inspiron-3543:~$ umask 0022
pratik@pratik-Inspiron-3543:~$ umask
0022
pratik@pratik-Inspiron-3543:~$ chmod 777 myfile1
pratik@pratik-Inspiron-3543:~$ umask
0022
pratik@pratik-Inspiron-3543:~$ umask myfile1
bash: umask: `m': invalid symbolic mode operator
pratik@pratik-Inspiron-3543:~$ cat >myfile1
HELLO! I am Pratik.
I am in OS LAb
I am doing umask and chmod command
pratik@pratik-Inspiron-3543:~$ umask 002
pratik@pratik-Inspiron-3543:~$ chmod 555 myfile1
pratik@pratik-Inspiron-3543:~$ ls -l
total 2244
-rwxrwxr-x 1 pratik pratik 13216 Feb 4 19:57 arrayman
-rw-rw-r-- 1 pratik pratik 326 Feb 4 19:57 arrayman.cpp
-rw-rw-r-- 1 pratik pratik 3344 Feb 4 19:57 arrayman.o
-rw-rw-r-- 1 pratik pratik 1 Jan 23 11:54 binary.cpp
-rwxrwxr-x 1 pratik pratik 13072 Jan 16 12:12 binarysearch
-rw-rw-r-- 1 pratik pratik 686 Jan 16 12:12 binarysearch.cpp
-rw-rw-r-- 1 pratik pratik 4136 Jan 16 12:12 binarysearch.o
-rwxrwxr-x 1 pratik pratik 21320 Feb 6 11:12 btreetravel
-rw-rw-r-- 1 pratik pratik 10521 Feb 6 11:12 btreetravel.cpp
-rw-rw-r-- 1 pratik pratik 24480 Feb 6 11:12 btreetravel.o
drwxr-xr-x 2 pratik pratik 4096 Feb 9 10:57 Desktop
drwxr-xr-x 4 pratik pratik 4096 Feb 11 09:51 Documents
drwxr-xr-x 4 pratik pratik 4096 Feb 9 11:00 Downloads
-rwxr-xr-x 1 pratik pratik 87 Aug 6 2018 easytether.destop
-rw-r--r-- 1 pratik pratik 8980 Aug 1 2018 examples.desktop
-rw-r--r-- 1 pratik pratik 1355 Oct 21 10:59 HashMapCode.class
-rw-rw-r-- 1 pratik pratik 637 Oct 21 10:59 HashMapCode.java
-rw-rw-r-- 1 pratik pratik 662 Oct 21 10:42 HashMap.java
-rw-r--r-- 1 pratik pratik 426 Oct 19 13:13 HelloWorld.class
-rw-rw-r-- 1 pratik pratik 175 Oct 19 13:11 HelloWorld.java
drwxrwxr-x 3 pratik pratik 4096 Oct 19 09:54 IdeaProjects
-rw-rw-r-- 1 pratik pratik 159 Oct 21 10:28 JAVA.java
-rwxrwxr-x 1 pratik pratik 13288 Jan 30 10:48 maxndmin
-rw-rw-r-- 1 pratik pratik 762 Jan 30 10:46 maxndmin.cpp
-rw-rw-r-- 1 pratik pratik 4440 Jan 30 10:48 maxndmin.o
-rw-rw-r-- 1 pratik pratik 95497 Dec 14 16:22 mozilla.pdf
-rwxrwxr-x 1 pratik pratik 13216 Feb 6 11:47 multiplymat
-rw-rw-r-- 1 pratik pratik 1408 Feb 6 12:11 multiplymat.cpp
-rw-rw-r-- 1 pratik pratik 6336 Feb 6 11:47 multiplymat.o
drwxr-xr-x 2 pratik pratik 4096 Aug 1 2018 Music
drwxr-xr-x 2 pratik pratik 4096 Jan 28 10:47 mydir
-r-xr-xr-x 1 pratik pratik 70 Feb 11 11:00 myfile1
-rw-r--r-- 1 pratik pratik 1713357 Feb 4 11:07 OSfile
-rw-r--r-- 1 pratik pratik 0 Feb 4 11:08 OSfile3
-rw-r--r-- 1 pratik pratik 4096 Feb 11 10:37 OSfile4
drwxr-xr-x 2 pratik pratik 4096 Feb 9 14:46 Pictures
drwxr-xr-x 2 pratik pratik 4096 Aug 1 2018 Public
-rwxrwxr-x 1 pratik pratik 13160 Jan 16 12:19 quicksort2
-rw-rw-r-- 1 pratik pratik 1115 Jan 16 12:19 quicksort2.cpp
-rw-rw-r-- 1 pratik pratik 4168 Jan 16 12:19 quicksort2.o
-rwxrwxr-x 1 pratik pratik 13296 Jan 23 11:59 selection
-rw-rw-r-- 1 pratik pratik 848 Jan 23 11:59 selection.cpp
-rw-rw-r-- 1 pratik pratik 4336 Jan 23 11:59 selection.o
drwxr-xr-x 3 pratik pratik 4096 Oct 18 14:02 snap
drwxr-xr-x 2 pratik pratik 4096 Aug 1 2018 Templates
-rwxrwxr-x 1 pratik pratik 40688 Jan 24 14:35 test
-rw-r--r-- 1 pratik pratik 24 Feb 4 09:58 test1
-rw-r--r-- 1 pratik pratik 44 Feb 4 11:12 test2
-rw-r--r-- 1 pratik pratik 11 Jan 28 11:30 test3
-rw-rw-r-- 1 pratik pratik 1054 Jan 24 14:34 test.cpp
-rw-rw-r-- 1 pratik pratik 78840 Jan 24 14:35 test.o
-rw-r--r-- 1 root root 43 Aug 10 2018 text
-rw-rw-r-- 1 pratik pratik 41 Feb 6 10:12 treefortraversal.cpp
drwxr-xr-x 2 pratik pratik 4096 Aug 1 2018 Videos
drwxrwxr-x 3 pratik pratik 4096 Aug 10 2018 'VirtualBox VMs'
pratik@pratik-Inspiron-3543:~$ ls -l myfile1
-r-xr-xr-x 1 pratik pratik 70 Feb 11 11:00 myfile1
pratik@pratik-Inspiron-3543:~$ cat >myfile2
HEllo Here I am
2.This is line 2
3.This is line 3
4.This is line 4
pratik@pratik-Inspiron-3543:~$ ls -l myfile2
-rw-rw-r-- 1 pratik pratik 68 Feb 11 11:07 myfile2
pratik@pratik-Inspiron-3543:~$ ls -l myfile1
-r-xr-xr-x 1 pratik pratik 70 Feb 11 11:00 myfile1
pratik@pratik-Inspiron-3543:~$ cat >myfile3
HEllo Here I am
2.This is line 2
3.This is line 3
4.This is line 4
5.This is line 5
6.This is line 6
7.This is line 7
pratik@pratik-Inspiron-3543:~$ ls -l myfile3
-rw-rw-r-- 1 pratik pratik 119 Feb 11 11:12 myfile3
pratik@pratik-Inspiron-3543:~$ cat >myfile4
In Unix and Unix-like operating systems, chmod is the command and system call
which may change the access permissions to file system objects. It may also
alter special mode flags. The request is filtered by the umask. The name is an
abbreviation of change mode.pratik@pratik-Inspiron-3543:~$ ls -l myfile4
-rw-rw-r-- 1 pratik pratik 261 Feb 11 11:14 myfile4
pratik@pratik-Inspiron-3543:~$ umask 222
pratik@pratik-Inspiron-3543:~$ ls -l myfile2
-rw-rw-r-- 1 pratik pratik 68 Feb 11 11:07 myfile2
pratik@pratik-Inspiron-3543:~$ ls -l myfile3
-rw-rw-r-- 1 pratik pratik 119 Feb 11 11:12 myfile3
pratik@pratik-Inspiron-3543:~$ ls -l myfile4
-rw-rw-r-- 1 pratik pratik 261 Feb 11 11:14 myfile4
pratik@pratik-Inspiron-3543:~$ cat >myfile5
THis IS my Test 5
pratik@pratik-Inspiron-3543:~$ chmod 444 myfile5
pratik@pratik-Inspiron-3543:~$ ls -l myfile5
-r--r--r-- 1 pratik pratik 18 Feb 11 11:30 myfile5
pratik@pratik-Inspiron-3543:~$ umask 333
pratik@pratik-Inspiron-3543:~$ ls -l myfile1
-r-xr-xr-x 1 pratik pratik 70 Feb 11 11:00 myfile1
pratik@pratik-Inspiron-3543:~$ ls -l myfile2
-rw-rw-r-- 1 pratik pratik 68 Feb 11 11:07 myfile2
pratik@pratik-Inspiron-3543:~$ ls -l myfile3
-rw-rw-r-- 1 pratik pratik 119 Feb 11 11:12 myfile3
pratik@pratik-Inspiron-3543:~$ ls -l myfile4
-rw-rw-r-- 1 pratik pratik 261 Feb 11 11:14 myfile4
pratik@pratik-Inspiron-3543:~$ ls -l myfile5
-r--r--r-- 1 pratik pratik 18 Feb 11 11:30 myfile5
pratik@pratik-Inspiron-3543:~$ cat >myfile6
111111112222222222233333333333333444444444444This is myfile6
pratik@pratik-Inspiron-3543:~$ cat >myfile7
77777777777777 myfile7 777777777777777
pratik@pratik-Inspiron-3543:~$ ls -l myfile6
-r--r--r-- 1 pratik pratik 7 Feb 11 11:37 myfile6
pratik@pratik-Inspiron-3543:~$ chmod 440 myfile7
pratik@pratik-Inspiron-3543:~$ cat >myfile8
This is my file 8
pratik@pratik-Inspiron-3543:~$ ls -l myfile7
-r--r----- 1 pratik pratik 39 Feb 11 11:38 myfile7
pratik@pratik-Inspiron-3543:~$ ls -l myfile8
-r--r--r-- 1 pratik pratik 19 Feb 11 12:28 myfile8
pratik@pratik-Inspiron-3543:~$ chmod u=w g=w o=w myfile8
chmod: cannot access 'g=w': No such file or directory
chmod: cannot access 'o=w': No such file or directory
pratik@pratik-Inspiron-3543:~$ split myfile3
pratik@pratik-Inspiron-3543:~$ cat myfile3
HEllo Here I am
2.This is line 2
3.This is line 3
4.This is line 4
5.This is line 5
6.This is line 6
7.This is line 7
pratik@pratik-Inspiron-3543:~$ ^C
pratik@pratik-Inspiron-3543:~$
PRACTICAL-6
• Zip and Unzip To create Zip And Unzip file using command line.
• split split is a utility on Unix and Unix-like operating systems most commonly used to
split a computer file into two or more smaller files.
• Nohup nohup is a POSIX command to ignore the HUP signal. The HUP signal is, by
convention, the way a terminal warns dependent processes of logout.
• Batch batch command is used to read commands from standard input or a specified
file and execute them when system load levels permit i.e. when the load average drops
below 1.5.
• crontab It is a cron command using to create cron jobs.Cron is one of the most
powerful tool in a Linux/Unix based operating systems. A cron job is a Linux utility
used for scheduling a task to be executed in the specific time according to its schedule
at designated time.
OUTPUT-:
pratik@pratik-Inspiron-3543:~$ script OsPractical
Script started, file is OsPractical
pratik@pratik-Inspiron-3543:~$ cat >f1
Pratik
Pradeep
Prikshit
Ritik
Nimesh
Nikhil
Uday
Sumit
pratik@pratik-Inspiron-3543:~$ sort f1
Nikhil
Nimesh
Pradeep
Pratik
Prikshit
Ritik
Sumit
Uday
pratik@pratik-Inspiron-3543:~$ cat >f1
^C
pratik@pratik-Inspiron-3543:~$ cat >f1
Pratik
Pradeep
Prikshit
Ritik
Nimesh
Nikhil
Uday
Sumit
Umakant
Pushkal
pratik@pratik-Inspiron-3543:~$ sort -o f2 f1
pratik@pratik-Inspiron-3543:~$ cat f2
Nikhil
Nimesh
Pradeep
Pratik
Prikshit
Pushkal
Ritik
Sumit
Uday
Umakant
pratik@pratik-Inspiron-3543:~$ ps
PID TTY TIME CMD
13023 pts/1 00:00:00 bash
13199 pts/1 00:00:00 ps
pratik@pratik-Inspiron-3543:~$ TIME
TIME: command not found
pratik@pratik-Inspiron-3543:~$ time
real 0m0.000s
user 0m0.000s
sys 0m0.000s
pratik@pratik-Inspiron-3543:~$ pid
pratik@pratik-Inspiron-3543:~$ tty
/dev/pts/1
pratik@pratik-Inspiron-3543:~$ ps -aux | less
pratik@pratik-Inspiron-3543:~$ ps -a
PID TTY TIME CMD
1155 tty1 00:00:00 gnome-session-b
1186 tty1 00:06:39 gnome-shell
1254 tty1 00:00:00 Xwayland
1287 tty1 00:00:00 ibus-daemon
1290 tty1 00:00:00 ibus-dconf
1293 tty1 00:00:00 ibus-x11
1305 tty1 00:00:00 gsd-xsettings
1315 tty1 00:00:00 gsd-a11y-settin
1319 tty1 00:00:00 gsd-clipboard
1322 tty1 00:01:16 gsd-color
1323 tty1 00:00:00 gsd-datetime
1328 tty1 00:00:00 gsd-housekeepin
1331 tty1 00:00:00 gsd-keyboard
1333 tty1 00:00:01 gsd-media-keys
1336 tty1 00:00:00 gsd-mouse
1337 tty1 00:00:02 gsd-power
1340 tty1 00:00:00 gsd-print-notif
1341 tty1 00:00:00 gsd-rfkill
1344 tty1 00:00:00 gsd-screensaver
1347 tty1 00:00:00 gsd-sharing
1348 tty1 00:00:00 gsd-smartcard
1356 tty1 00:00:00 gsd-sound
1359 tty1 00:00:00 gsd-wacom
1370 tty1 00:00:00 ibus-engine-sim
1462 tty2 01:46:41 Xorg
1469 tty2 00:00:05 gnome-session-b
1590 tty2 02:41:08 gnome-shell
1628 tty2 00:02:18 ibus-daemon
1632 tty2 00:00:00 ibus-dconf
1635 tty2 00:00:00 ibus-x11
1701 tty2 00:00:01 gsd-mouse
1702 tty2 00:00:05 gsd-power
1705 tty2 00:00:01 gsd-print-notif
1709 tty2 00:00:01 gsd-rfkill
1712 tty2 00:00:03 gsd-screensaver
1718 tty2 00:00:29 gsd-sharing
1722 tty2 00:00:01 gsd-smartcard
1725 tty2 00:00:01 gsd-sound
1727 tty2 00:00:02 gsd-xsettings
1730 tty2 00:00:02 gsd-wacom
1741 tty2 00:00:01 gsd-a11y-settin
1745 tty2 00:00:01 gsd-datetime
1747 tty2 00:00:02 gsd-clipboard
1751 tty2 00:01:17 gsd-color
1752 tty2 00:00:14 gsd-housekeepin
1753 tty2 00:00:02 gsd-keyboard
1757 tty2 00:00:08 gsd-media-keys
1767 tty2 00:00:01 gsd-locate-poin
1778 tty2 00:00:00 gsd-printer
1817 tty2 00:00:11 nautilus-deskto
1825 tty2 00:00:52 kdeconnectd
1826 tty2 00:00:00 gsd-disk-utilit
1856 tty2 00:00:34 ibus-engine-sim
2311 tty2 00:00:05 update-notifier
2314 tty2 00:02:04 gnome-software
2424 tty2 00:00:00 deja-dup-monito
12415 tty2 00:02:50 firefox
12474 tty2 00:00:41 Web Content
12521 tty2 00:00:10 WebExtensions
12585 tty2 00:00:00 chrome-gnome-sh
12931 tty2 00:00:08 Web Content
13022 pts/0 00:00:00 script
13212 tty2 00:00:07 Web Content
13318 tty2 00:00:00 Web Content
13390 pts/1 00:00:00 ps
pratik@pratik-Inspiron-3543:~$ ps -u
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
pratik 1460 0.0 0.0 212128 3316 tty2 Ssl+ Feb11 0:00 /usr/lib/gdm3/g
pratik 1462 1.0 2.1 457480 85568 tty2 Sl+ Feb11 106:43 /usr/lib/xorg/X
pratik 1469 0.0 0.1 715356 7364 tty2 Sl+ Feb11 0:05 /usr/lib/gnome-
pratik 1590 1.5 6.9 4020488 274904 tty2 Sl+ Feb11 161:15 /usr/bin/gnome-
pratik 1628 0.0 0.2 438560 8272 tty2 Sl Feb11 2:18 ibus-daemon --x
pratik 1632 0.0 0.0 280752 3408 tty2 Sl Feb11 0:00 /usr/lib/ibus/i
pratik 1635 0.0 0.2 343892 9944 tty2 Sl Feb11 0:00 /usr/lib/ibus/i
pratik 1701 0.0 0.0 278036 3516 tty2 Sl+ Feb11 0:01 /usr/lib/gnome-
pratik 1702 0.0 0.4 871916 17856 tty2 Sl+ Feb11 0:05 /usr/lib/gnome-
pratik 1705 0.0 0.1 349312 4960 tty2 Sl+ Feb11 0:01 /usr/lib/gnome-
pratik 1709 0.0 0.0 423344 3380 tty2 Sl+ Feb11 0:01 /usr/lib/gnome-
pratik 1712 0.0 0.1 275988 4240 tty2 Sl+ Feb11 0:03 /usr/lib/gnome-
pratik 1718 0.0 0.1 453104 6640 tty2 Sl+ Feb11 0:29 /usr/lib/gnome-
pratik 1722 0.0 0.0 377940 2448 tty2 Sl+ Feb11 0:01 /usr/lib/gnome-
pratik 1725 0.0 0.1 332868 3968 tty2 Sl+ Feb11 0:01 /usr/lib/gnome-
pratik 1727 0.0 0.3 494472 12908 tty2 Sl+ Feb11 0:02 /usr/lib/gnome-
pratik 1730 0.0 0.3 428348 13160 tty2 Sl+ Feb11 0:02 /usr/lib/gnome-
pratik 1741 0.0 0.0 278164 3372 tty2 Sl+ Feb11 0:01 /usr/lib/gnome-
pratik 1745 0.0 0.1 469744 6036 tty2 Sl+ Feb11 0:01 /usr/lib/gnome-
pratik 1747 0.0 0.2 343512 11120 tty2 Sl+ Feb11 0:02 /usr/lib/gnome-
pratik 1751 0.0 0.4 741788 15924 tty2 Sl+ Feb11 1:17 /usr/lib/gnome-
pratik 1752 0.0 0.1 364904 4652 tty2 Sl+ Feb11 0:14 /usr/lib/gnome-
pratik 1753 0.0 0.3 497836 12012 tty2 Sl+ Feb11 0:02 /usr/lib/gnome-
pratik 1757 0.0 0.3 1606016 15076 tty2 Sl+ Feb11 0:08 /usr/lib/gnome-
pratik 1767 0.0 0.2 341228 10916 tty2 Sl+ Feb11 0:01 /usr/lib/gnome-
pratik 1778 0.0 0.1 508752 6388 tty2 Sl+ Feb11 0:00 /usr/lib/gnome-
pratik 1817 0.0 0.7 838564 31120 tty2 Sl+ Feb11 0:11 nautilus-deskto
pratik 1825 0.0 0.3 821804 15344 tty2 Sl+ Feb11 0:52 /usr/lib/x86_64
pratik 1826 0.0 0.1 271932 4312 tty2 Sl+ Feb11 0:00 /usr/lib/gnome-
pratik 1856 0.0 0.0 204884 3708 tty2 Sl Feb11 0:34 /usr/lib/ibus/i
pratik 2311 0.0 0.4 722332 16664 tty2 Sl+ Feb11 0:05 update-notifier
pratik 2314 0.0 4.1 1523908 163676 tty2 SLl+ Feb11 2:04 /usr/bin/gnome-
pratik 2424 0.0 0.2 787660 10812 tty2 Sl+ Feb11 0:00 /usr/lib/deja-d
pratik 12415 3.6 10.2 2179364 403360 tty2 Sl+ 09:35 2:51 /usr/lib/firefo
pratik 12474 0.9 3.6 1646964 144100 tty2 Sl+ 09:35 0:41 /usr/lib/firefo
pratik 12521 0.2 2.9 1543332 115832 tty2 Sl+ 09:35 0:10 /usr/lib/firefo
pratik 12585 0.0 0.6 264200 27496 tty2 Sl+ 09:35 0:00 /usr/bin/python
pratik 12931 0.3 3.4 1583756 137220 tty2 Sl+ 10:15 0:08 /usr/lib/firefo
pratik 13014 0.0 0.1 29552 4572 pts/0 Ss 10:18 0:00 bash
pratik 13022 0.0 0.0 29352 2528 pts/0 S+ 10:19 0:00 script OsPracti
pratik 13023 0.0 0.1 29556 4788 pts/1 Ss 10:19 0:00 bash -i
pratik 13212 1.0 3.7 1594436 148948 tty2 Sl+ 10:39 0:08 /usr/lib/firefo
pratik 13318 0.0 2.0 1504856 81180 tty2 Sl+ 10:45 0:00 /usr/lib/firefo
pratik 13403 0.0 0.0 44472 3108 pts/1 R+ 10:52 0:00 ps -u
pratik@pratik-Inspiron-3543:~$ ps -x
PID TTY STAT TIME COMMAND
1442 ? Ss 0:03 /lib/systemd/systemd --user
1443 ? S 0:00 (sd-pam)
1456 ? Sl 0:00 /usr/bin/gnome-keyring-daemon --daemonize --login
1460 tty2 Ssl+ 0:00 /usr/lib/gdm3/gdm-x-session --run-script env GNOME_SH
1462 tty2 Sl+ 106:44 /usr/lib/xorg/Xorg vt2 -displayfd 3 -auth /run/user/1
1466 ? Ss 0:12 /usr/bin/dbus-daemon --session --address=systemd: --n
1469 tty2 Sl+ 0:05 /usr/lib/gnome-session/gnome-session-binary --session
1564 ? Ss 0:01 /usr/bin/ssh-agent /usr/bin/im-launch env GNOME_SHELL
1566 ? Ssl 0:00 /usr/lib/at-spi2-core/at-spi-bus-launcher
1571 ? S 0:06 /usr/bin/dbus-daemon --config-file=/usr/share/default
1573 ? Sl 0:47 /usr/lib/at-spi2-core/at-spi2-registryd --use-gnome-s
1590 tty2 Sl+ 161:17 /usr/bin/gnome-shell
1596 ? Ssl 0:00 /usr/lib/gvfs/gvfsd
1601 ? Sl 0:00 /usr/lib/gvfs/gvfsd-fuse /run/user/1000/gvfs -f -o bi
1612 ? S<l 45:52 /usr/bin/pulseaudio --start --log-target=syslog
1628 tty2 Sl 2:18 ibus-daemon --xim --panel disable
1632 tty2 Sl 0:00 /usr/lib/ibus/ibus-dconf
1635 tty2 Sl 0:00 /usr/lib/ibus/ibus-x11 --kill-daemon
1637 ? Sl 0:00 /usr/lib/ibus/ibus-portal
1648 ? Sl 0:00 /usr/lib/gnome-shell/gnome-shell-calendar-server
1657 ? Ssl 0:11 /usr/lib/gvfs/gvfs-udisks2-volume-monitor
1661 ? Ssl 0:00 /usr/lib/evolution/evolution-source-registry
1665 ? Ssl 0:00 /usr/lib/gvfs/gvfs-gphoto2-volume-monitor
1673 ? Ssl 0:00 /usr/lib/gvfs/gvfs-goa-volume-monitor
1676 ? Sl 0:00 /usr/lib/gnome-online-accounts/goa-daemon
1685 ? Sl 0:00 /usr/lib/gnome-online-accounts/goa-identity-service
1689 ? Ssl 0:00 /usr/lib/gvfs/gvfs-afc-volume-monitor
1697 ? Ssl 0:00 /usr/lib/gvfs/gvfs-mtp-volume-monitor
1701 tty2 Sl+ 0:01 /usr/lib/gnome-settings-daemon/gsd-mouse
1702 tty2 Sl+ 0:05 /usr/lib/gnome-settings-daemon/gsd-power
1705 tty2 Sl+ 0:01 /usr/lib/gnome-settings-daemon/gsd-print-notification
1709 tty2 Sl+ 0:01 /usr/lib/gnome-settings-daemon/gsd-rfkill
1712 tty2 Sl+ 0:03 /usr/lib/gnome-settings-daemon/gsd-screensaver-proxy
1718 tty2 Sl+ 0:29 /usr/lib/gnome-settings-daemon/gsd-sharing
1722 tty2 Sl+ 0:01 /usr/lib/gnome-settings-daemon/gsd-smartcard
1725 tty2 Sl+ 0:01 /usr/lib/gnome-settings-daemon/gsd-sound
1727 tty2 Sl+ 0:02 /usr/lib/gnome-settings-daemon/gsd-xsettings
1730 tty2 Sl+ 0:02 /usr/lib/gnome-settings-daemon/gsd-wacom
1741 tty2 Sl+ 0:01 /usr/lib/gnome-settings-daemon/gsd-a11y-settings
1745 tty2 Sl+ 0:01 /usr/lib/gnome-settings-daemon/gsd-datetime
1747 tty2 Sl+ 0:02 /usr/lib/gnome-settings-daemon/gsd-clipboard
1751 tty2 Sl+ 1:17 /usr/lib/gnome-settings-daemon/gsd-color
1752 tty2 Sl+ 0:14 /usr/lib/gnome-settings-daemon/gsd-housekeeping
1753 tty2 Sl+ 0:02 /usr/lib/gnome-settings-daemon/gsd-keyboard
1757 tty2 Sl+ 0:08 /usr/lib/gnome-settings-daemon/gsd-media-keys
1767 tty2 Sl+ 0:01 /usr/lib/gnome-settings-daemon/gsd-locate-pointer
1778 tty2 Sl+ 0:00 /usr/lib/gnome-settings-daemon/gsd-printer
1817 tty2 Sl+ 0:11 nautilus-desktop
1825 tty2 Sl+ 0:52 /usr/lib/x86_64-linux-gnu/libexec/kdeconnectd
1826 tty2 Sl+ 0:00 /usr/lib/gnome-disk-utility/gsd-disk-utility-notify
1833 ? Sl 0:00 /usr/lib/gvfs/gvfsd-trash --spawner :1.22 /org/gtk/gv
1839 ? Sl 0:00 /usr/lib/dconf/dconf-service
1843 ? Ssl 0:00 /usr/lib/evolution/evolution-calendar-factory
1856 tty2 Sl 0:34 /usr/lib/ibus/ibus-engine-simple
1921 ? Ssl 0:00 /usr/lib/gvfs/gvfsd-metadata
1940 ? Sl 0:01 /usr/lib/evolution/evolution-calendar-factory-subproc
1954 ? Ssl 0:00 /usr/lib/evolution/evolution-addressbook-factory
1963 ? Sl 0:00 /usr/lib/evolution/evolution-addressbook-factory-subp
2311 tty2 Sl+ 0:05 update-notifier
2314 tty2 SLl+ 2:04 /usr/bin/gnome-software --gapplication-service
2424 tty2 Sl+ 0:00 /usr/lib/deja-dup/deja-dup-monitor
2604 ? Sl 0:00 /usr/lib/gvfs/gvfsd-recent --spawner :1.22 /org/gtk/g
2761 ? Sl 0:00 /usr/lib/gvfs/gvfsd-network --spawner :1.22 /org/gtk/
2807 ? Sl 0:00 /usr/lib/gvfs/gvfsd-dnssd --spawner :1.22 /org/gtk/gv
8132 ? Sl 0:00 /usr/lib/libreoffice/program/oosplash --impress file:
8151 ? Sl 0:55 /usr/lib/libreoffice/program/soffice.bin --impress fi
8280 ? Sl 0:05 evince /media/pratik/New Volume/SEM 3 Books/201709061
8286 ? Ssl 0:00 /usr/lib/evince/evinced
12415 tty2 Sl+ 2:52 /usr/lib/firefox/firefox -new-window
12474 tty2 Sl+ 0:41 /usr/lib/firefox/firefox -contentproc -childID 1 -isF
12521 tty2 Sl+ 0:10 /usr/lib/firefox/firefox -contentproc -childID 2 -isF
12585 tty2 Sl+ 0:00 /usr/bin/python3 /usr/bin/chrome-gnome-shell /usr/lib
12931 tty2 Sl+ 0:08 /usr/lib/firefox/firefox -contentproc -childID 5 -isF
13005 ? Rsl 0:05 /usr/lib/gnome-terminal/gnome-terminal-server
13014 pts/0 Ss 0:00 bash
13022 pts/0 S+ 0:00 script OsPractical
13023 pts/1 Ss 0:00 bash -i
13212 tty2 Sl+ 0:08 /usr/lib/firefox/firefox -contentproc -childID 7 -isF
13318 tty2 Sl+ 0:00 /usr/lib/firefox/firefox -contentproc -childID 8 -isF
13408 pts/1 R+ 0:00 ps -x
22962 ? Ssl 0:00 /usr/bin/zeitgeist-daemon
22978 ? Ssl 0:00 /usr/lib/zeitgeist/zeitgeist/zeitgeist-fts
pratik@pratik-Inspiron-3543:~$ ps -e
PID TTY TIME CMD
1 ? 00:02:19 systemd
2 ? 00:00:00 kthreadd
4 ? 00:00:00 kworker/0:0H
6 ? 00:00:00 mm_percpu_wq
7 ? 00:00:01 ksoftirqd/0
8 ? 00:02:28 rcu_sched
9 ? 00:00:00 rcu_bh
10 ? 00:00:00 migration/0
11 ? 00:00:00 watchdog/0
12 ? 00:00:00 cpuhp/0
13 ? 00:00:00 cpuhp/1
14 ? 00:00:00 watchdog/1
15 ? 00:00:00 migration/1
16 ? 00:00:02 ksoftirqd/1
18 ? 00:00:00 kworker/1:0H
19 ? 00:00:00 cpuhp/2
20 ? 00:00:00 watchdog/2
21 ? 00:00:00 migration/2
22 ? 00:00:23 ksoftirqd/2
24 ? 00:00:00 kworker/2:0H
25 ? 00:00:00 cpuhp/3
26 ? 00:00:00 watchdog/3
27 ? 00:00:00 migration/3
28 ? 00:00:01 ksoftirqd/3
30 ? 00:00:00 kworker/3:0H
31 ? 00:00:00 kdevtmpfs
32 ? 00:00:00 netns
33 ? 00:00:00 rcu_tasks_kthre
34 ? 00:00:00 kauditd
38 ? 00:00:00 khungtaskd
39 ? 00:00:00 oom_reaper
40 ? 00:00:00 writeback
41 ? 00:00:00 kcompactd0
42 ? 00:00:00 ksmd
43 ? 00:00:00 khugepaged
44 ? 00:00:00 crypto
45 ? 00:00:00 kintegrityd
46 ? 00:00:00 kblockd
48 ? 00:00:00 ata_sff
51 ? 00:00:00 md
52 ? 00:00:00 edac-poller
53 ? 00:00:00 devfreq_wq
54 ? 00:00:00 watchdogd
57 ? 00:00:15 kswapd0
58 ? 00:00:00 ecryptfs-kthrea
100 ? 00:00:00 kthrotld
101 ? 00:00:00 acpi_thermal_pm
106 ? 00:00:00 ipv6_addrconf
115 ? 00:00:00 kstrp
132 ? 00:00:00 charger_manager
185 ? 00:09:22 irq/30-DLL0654:
187 ? 00:00:00 scsi_eh_0
188 ? 00:00:00 scsi_tmf_0
189 ? 00:00:00 scsi_eh_1
190 ? 00:00:00 scsi_tmf_1
191 ? 00:00:00 scsi_eh_2
192 ? 00:00:00 scsi_tmf_2
193 ? 00:00:00 scsi_eh_3
194 ? 00:00:00 scsi_tmf_3
198 ? 00:01:01 i915/signal:0
199 ? 00:00:00 i915/signal:1
200 ? 00:00:00 i915/signal:2
201 ? 00:00:00 i915/signal:4
204 ? 00:00:00 rmi4-poller
205 ? 00:03:59 irq/49-i2c_hid
208 ? 00:00:00 kworker/3:1H
212 ? 00:00:06 kworker/0:1H
216 ? 00:00:00 kworker/1:1H
244 ? 00:00:15 jbd2/sda11-8
245 ? 00:00:00 ext4-rsv-conver
277 ? 00:00:00 kworker/2:1H
287 ? 00:00:15 systemd-journal
306 ? 00:00:02 systemd-udevd
392 ? 00:00:00 cfg80211
481 ? 00:00:00 wl_event_handle
579 ? 00:00:00 kmemstick
655 ? 00:00:00 loop0
656 ? 00:00:00 loop1
657 ? 00:00:00 loop2
658 ? 00:00:00 loop3
659 ? 00:00:00 loop4
660 ? 00:00:00 loop5
661 ? 00:00:00 loop6
662 ? 00:00:00 loop7
663 ? 00:00:00 loop8
664 ? 00:00:00 loop9
665 ? 00:00:00 loop10
667 ? 00:00:00 loop11
669 ? 00:00:00 loop13
670 ? 00:00:00 loop14
673 ? 00:00:00 loop16
674 ? 00:00:00 loop17
676 ? 00:00:00 loop19
677 ? 00:00:00 loop20
678 ? 00:00:00 loop21
679 ? 00:00:00 loop22
789 ? 00:01:22 systemd-resolve
889 ? 00:00:11 acpid
890 ? 00:00:01 avahi-daemon
891 ? 00:00:05 rsyslogd
892 ? 00:01:14 dbus-daemon
894 ? 00:00:00 avahi-daemon
926 ? 00:01:20 NetworkManager
927 ? 00:00:09 wpa_supplicant
930 ? 00:00:16 thermald
931 ? 00:00:24 irqbalance
932 ? 00:00:00 ModemManager
933 ? 00:00:03 systemd-logind
934 ? 00:00:00 bluetoothd
938 ? 00:00:18 udisksd
942 ? 00:00:00 networkd-dispat
943 ? 00:00:04 accounts-daemon
944 ? 00:00:00 cron
997 ? 00:00:04 polkitd
1028 ? 00:00:00 iprt-VBoxWQueue
1032 ? 00:00:00 iprt-VBoxTscThr
1050 ? 00:00:00 unattended-upgr
1076 ? 00:00:00 gdm3
1113 ? 00:00:00 gdm-session-wor
1130 ? 00:05:30 tor
1133 ? 00:00:00 systemd
1134 ? 00:00:00 (sd-pam)
1145 tty1 00:00:00 gdm-wayland-ses
1147 ? 00:00:00 dbus-daemon
1155 tty1 00:00:00 gnome-session-b
1186 tty1 00:06:41 gnome-shell
1224 ? 00:00:10 upowerd
1246 ? 00:00:00 whoopsie
1248 ? 00:00:09 kerneloops
1250 ? 00:00:09 kerneloops
1254 tty1 00:00:00 Xwayland
1261 ? 00:00:00 at-spi-bus-laun
1266 ? 00:00:00 dbus-daemon
1268 ? 00:00:00 at-spi2-registr
1272 ? 00:00:00 pulseaudio
1273 ? 00:00:02 rtkit-daemon
1287 tty1 00:00:00 ibus-daemon
1290 tty1 00:00:00 ibus-dconf
1293 tty1 00:00:00 ibus-x11
1298 ? 00:00:00 ibus-portal
1303 ? 00:00:00 boltd
1305 tty1 00:00:00 gsd-xsettings
1306 ? 00:00:26 packagekitd
1315 tty1 00:00:00 gsd-a11y-settin
1319 tty1 00:00:00 gsd-clipboard
1322 tty1 00:01:16 gsd-color
1323 tty1 00:00:00 gsd-datetime
1325 ? 00:00:00 dconf-service
1328 tty1 00:00:00 gsd-housekeepin
1331 tty1 00:00:00 gsd-keyboard
1333 tty1 00:00:01 gsd-media-keys
1336 tty1 00:00:00 gsd-mouse
1337 tty1 00:00:02 gsd-power
1340 tty1 00:00:00 gsd-print-notif
1341 tty1 00:00:00 gsd-rfkill
1344 tty1 00:00:00 gsd-screensaver
1347 tty1 00:00:00 gsd-sharing
1348 tty1 00:00:00 gsd-smartcard
1356 tty1 00:00:00 gsd-sound
1359 tty1 00:00:00 gsd-wacom
1370 tty1 00:00:00 ibus-engine-sim
1405 ? 00:00:00 colord
1439 ? 00:00:00 gdm-session-wor
1442 ? 00:00:03 systemd
1443 ? 00:00:00 (sd-pam)
1456 ? 00:00:00 gnome-keyring-d
1460 tty2 00:00:00 gdm-x-session
1462 tty2 01:46:53 Xorg
1466 ? 00:00:12 dbus-daemon
1469 tty2 00:00:05 gnome-session-b
1564 ? 00:00:01 ssh-agent
1566 ? 00:00:00 at-spi-bus-laun
1571 ? 00:00:06 dbus-daemon
1573 ? 00:00:47 at-spi2-registr
1590 tty2 02:41:35 gnome-shell
1596 ? 00:00:00 gvfsd
1601 ? 00:00:00 gvfsd-fuse
1612 ? 00:45:52 pulseaudio
1616 ? 00:00:00 krfcommd
1628 tty2 00:02:18 ibus-daemon
1632 tty2 00:00:00 ibus-dconf
1635 tty2 00:00:00 ibus-x11
1637 ? 00:00:00 ibus-portal
1648 ? 00:00:00 gnome-shell-cal
1657 ? 00:00:11 gvfs-udisks2-vo
1661 ? 00:00:00 evolution-sourc
1665 ? 00:00:00 gvfs-gphoto2-vo
1673 ? 00:00:00 gvfs-goa-volume
1676 ? 00:00:00 goa-daemon
1685 ? 00:00:00 goa-identity-se
1689 ? 00:00:00 gvfs-afc-volume
1697 ? 00:00:00 gvfs-mtp-volume
1701 tty2 00:00:01 gsd-mouse
1702 tty2 00:00:05 gsd-power
1705 tty2 00:00:01 gsd-print-notif
1709 tty2 00:00:01 gsd-rfkill
1712 tty2 00:00:03 gsd-screensaver
1718 tty2 00:00:29 gsd-sharing
1722 tty2 00:00:01 gsd-smartcard
1725 tty2 00:00:01 gsd-sound
1727 tty2 00:00:02 gsd-xsettings
1730 tty2 00:00:02 gsd-wacom
1741 tty2 00:00:01 gsd-a11y-settin
1745 tty2 00:00:01 gsd-datetime
1747 tty2 00:00:02 gsd-clipboard
1751 tty2 00:01:17 gsd-color
1752 tty2 00:00:14 gsd-housekeepin
1753 tty2 00:00:02 gsd-keyboard
1757 tty2 00:00:08 gsd-media-keys
1767 tty2 00:00:01 gsd-locate-poin
1778 tty2 00:00:00 gsd-printer
1817 tty2 00:00:11 nautilus-deskto
1825 tty2 00:00:52 kdeconnectd
1826 tty2 00:00:00 gsd-disk-utilit
1833 ? 00:00:00 gvfsd-trash
1839 ? 00:00:00 dconf-service
1843 ? 00:00:00 evolution-calen
1856 tty2 00:00:34 ibus-engine-sim
1921 ? 00:00:00 gvfsd-metadata
1940 ? 00:00:01 evolution-calen
1954 ? 00:00:00 evolution-addre
1963 ? 00:00:00 evolution-addre
2311 tty2 00:00:05 update-notifier
2314 tty2 00:02:04 gnome-software
2332 ? 00:00:07 fwupd
2424 tty2 00:00:00 deja-dup-monito
2604 ? 00:00:00 gvfsd-recent
2761 ? 00:00:00 gvfsd-network
2776 ? 00:00:03 mount.ntfs
2807 ? 00:00:00 gvfsd-dnssd
8132 ? 00:00:00 oosplash
8151 ? 00:00:56 soffice.bin
8280 ? 00:00:05 evince
8286 ? 00:00:00 evinced
9075 ? 00:00:01 kworker/0:1
10321 ? 00:00:00 cupsd
10322 ? 00:00:00 cups-browsed
11438 ? 00:00:00 kworker/2:1
11603 ? 00:00:01 kworker/u8:38
11633 ? 00:00:00 irq/52-mei_me
11751 ? 00:00:00 dhclient
12415 tty2 00:03:08 firefox
12474 tty2 00:00:42 Web Content
12521 tty2 00:00:11 WebExtensions
12585 tty2 00:00:00 chrome-gnome-sh
12911 ? 00:00:00 kworker/u8:1
12931 tty2 00:00:12 Web Content
13005 ? 00:00:06 gnome-terminal-
13014 pts/0 00:00:00 bash
13022 pts/0 00:00:00 script
13023 pts/1 00:00:00 bash
13149 ? 00:00:00 kworker/1:3
13212 tty2 00:00:11 Web Content
13318 tty2 00:00:21 Web Content
13374 ? 00:00:00 kworker/3:2
13380 ? 00:00:00 kworker/u8:2
13401 ? 00:00:00 kworker/1:1
13402 ? 00:00:00 kworker/2:2
13405 ? 00:00:00 kworker/3:0
13406 ? 00:00:00 kworker/0:2
13519 ? 00:00:00 kworker/1:0
13528 ? 00:00:00 kworker/0:0
13529 ? 00:00:00 kworker/2:0
13530 ? 00:00:00 kworker/3:1
13559 ? 00:00:00 kworker/1:2
13560 pts/1 00:00:00 ps
14550 ? 00:00:00 xfsalloc
14551 ? 00:00:00 xfs_mru_cache
14564 ? 00:00:00 jfsIO
14565 ? 00:00:00 jfsCommit
14566 ? 00:00:00 jfsCommit
14567 ? 00:00:00 jfsCommit
14568 ? 00:00:00 jfsCommit
14569 ? 00:00:00 jfsSync
21895 ? 00:00:00 kworker/u9:0
22962 ? 00:00:00 zeitgeist-daemo
22978 ? 00:00:00 zeitgeist-fts
24121 ? 00:00:00 loop23
24183 ? 00:01:07 snapd
24401 ? 00:00:00 loop12
24505 ? 00:00:00 loop24
24889 ? 00:00:00 loop18
30264 ? 00:00:49 mount.ntfs
32575 ? 00:00:00 kworker/u9:2
pratik@pratik-Inspiron-3543:~$ ps -f
UID PID PPID C STIME TTY TIME CMD
pratik 13023 13022 0 10:19 pts/1 00:00:00 bash -i
pratik 13573 13023 0 11:03 pts/1 00:00:00 ps -f
pratik@pratik-Inspiron-3543:~$ ps -l
F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD
0 S 1000 13023 13022 0 80 0 - 7389 wait pts/1 00:00:00 bash
4 R 1000 13574 13023 0 80 0 - 9004 - pts/1 00:00:00 ps
pratik@pratik-Inspiron-3543:~$ ps -ef
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 Feb11 ? 00:02:19 /sbin/init splash
root 2 0 0 Feb11 ? 00:00:00 [kthreadd]
root 4 2 0 Feb11 ? 00:00:00 [kworker/0:0H]
root 6 2 0 Feb11 ? 00:00:00 [mm_percpu_wq]
root 7 2 0 Feb11 ? 00:00:01 [ksoftirqd/0]
root 8 2 0 Feb11 ? 00:02:28 [rcu_sched]
root 9 2 0 Feb11 ? 00:00:00 [rcu_bh]
root 10 2 0 Feb11 ? 00:00:00 [migration/0]
root 11 2 0 Feb11 ? 00:00:00 [watchdog/0]
root 12 2 0 Feb11 ? 00:00:00 [cpuhp/0]
root 13 2 0 Feb11 ? 00:00:00 [cpuhp/1]
root 14 2 0 Feb11 ? 00:00:00 [watchdog/1]
root 15 2 0 Feb11 ? 00:00:00 [migration/1]
root 16 2 0 Feb11 ? 00:00:02 [ksoftirqd/1]
root 18 2 0 Feb11 ? 00:00:00 [kworker/1:0H]
root 19 2 0 Feb11 ? 00:00:00 [cpuhp/2]
root 20 2 0 Feb11 ? 00:00:00 [watchdog/2]
root 21 2 0 Feb11 ? 00:00:00 [migration/2]
root 22 2 0 Feb11 ? 00:00:23 [ksoftirqd/2]
root 24 2 0 Feb11 ? 00:00:00 [kworker/2:0H]
root 25 2 0 Feb11 ? 00:00:00 [cpuhp/3]
root 26 2 0 Feb11 ? 00:00:00 [watchdog/3]
root 27 2 0 Feb11 ? 00:00:00 [migration/3]
root 28 2 0 Feb11 ? 00:00:01 [ksoftirqd/3]
root 30 2 0 Feb11 ? 00:00:00 [kworker/3:0H]
root 31 2 0 Feb11 ? 00:00:00 [kdevtmpfs]
root 32 2 0 Feb11 ? 00:00:00 [netns]
root 33 2 0 Feb11 ? 00:00:00 [rcu_tasks_kthre]
root 34 2 0 Feb11 ? 00:00:00 [kauditd]
root 38 2 0 Feb11 ? 00:00:00 [khungtaskd]
root 39 2 0 Feb11 ? 00:00:00 [oom_reaper]
root 40 2 0 Feb11 ? 00:00:00 [writeback]
root 41 2 0 Feb11 ? 00:00:00 [kcompactd0]
root 42 2 0 Feb11 ? 00:00:00 [ksmd]
root 43 2 0 Feb11 ? 00:00:00 [khugepaged]
root 44 2 0 Feb11 ? 00:00:00 [crypto]
root 45 2 0 Feb11 ? 00:00:00 [kintegrityd]
root 46 2 0 Feb11 ? 00:00:00 [kblockd]
root 48 2 0 Feb11 ? 00:00:00 [ata_sff]
root 51 2 0 Feb11 ? 00:00:00 [md]
root 52 2 0 Feb11 ? 00:00:00 [edac-poller]
root 53 2 0 Feb11 ? 00:00:00 [devfreq_wq]
root 54 2 0 Feb11 ? 00:00:00 [watchdogd]
root 57 2 0 Feb11 ? 00:00:15 [kswapd0]
root 58 2 0 Feb11 ? 00:00:00 [ecryptfs-kthrea]
root 100 2 0 Feb11 ? 00:00:00 [kthrotld]
root 101 2 0 Feb11 ? 00:00:00 [acpi_thermal_pm]
root 106 2 0 Feb11 ? 00:00:00 [ipv6_addrconf]
root 115 2 0 Feb11 ? 00:00:00 [kstrp]
root 132 2 0 Feb11 ? 00:00:00 [charger_manager]
root 185 2 0 Feb11 ? 00:09:22 [irq/30-DLL0654:]
root 187 2 0 Feb11 ? 00:00:00 [scsi_eh_0]
root 188 2 0 Feb11 ? 00:00:00 [scsi_tmf_0]
root 189 2 0 Feb11 ? 00:00:00 [scsi_eh_1]
root 190 2 0 Feb11 ? 00:00:00 [scsi_tmf_1]
root 191 2 0 Feb11 ? 00:00:00 [scsi_eh_2]
root 192 2 0 Feb11 ? 00:00:00 [scsi_tmf_2]
root 193 2 0 Feb11 ? 00:00:00 [scsi_eh_3]
root 194 2 0 Feb11 ? 00:00:00 [scsi_tmf_3]
root 198 2 0 Feb11 ? 00:01:01 [i915/signal:0]
root 199 2 0 Feb11 ? 00:00:00 [i915/signal:1]
root 200 2 0 Feb11 ? 00:00:00 [i915/signal:2]
root 201 2 0 Feb11 ? 00:00:00 [i915/signal:4]
root 204 2 0 Feb11 ? 00:00:00 [rmi4-poller]
root 205 2 0 Feb11 ? 00:03:59 [irq/49-i2c_hid]
root 208 2 0 Feb11 ? 00:00:00 [kworker/3:1H]
root 212 2 0 Feb11 ? 00:00:06 [kworker/0:1H]
root 216 2 0 Feb11 ? 00:00:00 [kworker/1:1H]
root 244 2 0 Feb11 ? 00:00:15 [jbd2/sda11-8]
root 245 2 0 Feb11 ? 00:00:00 [ext4-rsv-conver]
root 277 2 0 Feb11 ? 00:00:00 [kworker/2:1H]
root 287 1 0 Feb11 ? 00:00:15 /lib/systemd/systemd-journald
root 306 1 0 Feb11 ? 00:00:02 /lib/systemd/systemd-udevd
root 392 2 0 Feb11 ? 00:00:00 [cfg80211]
root 481 2 0 Feb11 ? 00:00:00 [wl_event_handle]
root 579 2 0 Feb11 ? 00:00:00 [kmemstick]
root 655 2 0 Feb11 ? 00:00:00 [loop0]
root 656 2 0 Feb11 ? 00:00:00 [loop1]
root 657 2 0 Feb11 ? 00:00:00 [loop2]
root 658 2 0 Feb11 ? 00:00:00 [loop3]
root 659 2 0 Feb11 ? 00:00:00 [loop4]
root 660 2 0 Feb11 ? 00:00:00 [loop5]
root 661 2 0 Feb11 ? 00:00:00 [loop6]
root 662 2 0 Feb11 ? 00:00:00 [loop7]
root 663 2 0 Feb11 ? 00:00:00 [loop8]
root 664 2 0 Feb11 ? 00:00:00 [loop9]
root 665 2 0 Feb11 ? 00:00:00 [loop10]
root 667 2 0 Feb11 ? 00:00:00 [loop11]
root 669 2 0 Feb11 ? 00:00:00 [loop13]
root 670 2 0 Feb11 ? 00:00:00 [loop14]
root 673 2 0 Feb11 ? 00:00:00 [loop16]
root 674 2 0 Feb11 ? 00:00:00 [loop17]
root 676 2 0 Feb11 ? 00:00:00 [loop19]
root 677 2 0 Feb11 ? 00:00:00 [loop20]
root 678 2 0 Feb11 ? 00:00:00 [loop21]
root 679 2 0 Feb11 ? 00:00:00 [loop22]
systemd+ 789 1 0 Feb11 ? 00:01:22 /lib/systemd/systemd-resolved
root 889 1 0 Feb11 ? 00:00:11 /usr/sbin/acpid
avahi 890 1 0 Feb11 ? 00:00:01 avahi-daemon: running [pratik-In
syslog 891 1 0 Feb11 ? 00:00:05 /usr/sbin/rsyslogd -n
message+ 892 1 0 Feb11 ? 00:01:14 /usr/bin/dbus-daemon --system --
avahi 894 890 0 Feb11 ? 00:00:00 avahi-daemon: chroot helper
root 926 1 0 Feb11 ? 00:01:20 /usr/sbin/NetworkManager --no-da
root 927 1 0 Feb11 ? 00:00:09 /sbin/wpa_supplicant -u -s -O /r
root 930 1 0 Feb11 ? 00:00:16 /usr/sbin/thermald --no-daemon -
root 931 1 0 Feb11 ? 00:00:24 /usr/sbin/irqbalance --foregroun
root 932 1 0 Feb11 ? 00:00:00 /usr/sbin/ModemManager
root 933 1 0 Feb11 ? 00:00:03 /lib/systemd/systemd-logind
root 934 1 0 Feb11 ? 00:00:00 /usr/lib/bluetooth/bluetoothd
root 938 1 0 Feb11 ? 00:00:18 /usr/lib/udisks2/udisksd
root 942 1 0 Feb11 ? 00:00:00 /usr/bin/python3 /usr/bin/networ
root 943 1 0 Feb11 ? 00:00:04 /usr/lib/accountsservice/account
root 944 1 0 Feb11 ? 00:00:00 /usr/sbin/cron -f
root 997 1 0 Feb11 ? 00:00:04 /usr/lib/policykit-1/polkitd --n
root 1028 2 0 Feb11 ? 00:00:00 [iprt-VBoxWQueue]
root 1032 2 0 Feb11 ? 00:00:00 [iprt-VBoxTscThr]
root 1050 1 0 Feb11 ? 00:00:00 /usr/bin/python3 /usr/share/unat
root 1076 1 0 Feb11 ? 00:00:00 /usr/sbin/gdm3
root 1113 1076 0 Feb11 ? 00:00:00 gdm-session-worker [pam/gdm-laun
debian-+ 1130 1 0 Feb11 ? 00:05:30 /usr/bin/tor --defaults-torrc /u
gdm 1133 1 0 Feb11 ? 00:00:00 /lib/systemd/systemd --user
gdm 1134 1133 0 Feb11 ? 00:00:00 (sd-pam)
gdm 1145 1113 0 Feb11 tty1 00:00:00 /usr/lib/gdm3/gdm-wayland-sessio
gdm 1147 1133 0 Feb11 ? 00:00:00 /usr/bin/dbus-daemon --session -
gdm 1155 1145 0 Feb11 tty1 00:00:00 /usr/lib/gnome-session/gnome-ses
gdm 1186 1155 0 Feb11 tty1 00:06:41 /usr/bin/gnome-shell
root 1224 1 0 Feb11 ? 00:00:10 /usr/lib/upower/upowerd
whoopsie 1246 1 0 Feb11 ? 00:00:00 /usr/bin/whoopsie -f
kernoops 1248 1 0 Feb11 ? 00:00:09 /usr/sbin/kerneloops --test
kernoops 1250 1 0 Feb11 ? 00:00:09 /usr/sbin/kerneloops
gdm 1254 1186 0 Feb11 tty1 00:00:00 /usr/bin/Xwayland :1024 -rootles
gdm 1261 1133 0 Feb11 ? 00:00:00 /usr/lib/at-spi2-core/at-spi-bus
gdm 1266 1261 0 Feb11 ? 00:00:00 /usr/bin/dbus-daemon --config-fi
gdm 1268 1133 0 Feb11 ? 00:00:00 /usr/lib/at-spi2-core/at-spi2-re
gdm 1272 1133 0 Feb11 ? 00:00:00 /usr/bin/pulseaudio --daemonize=
rtkit 1273 1 0 Feb11 ? 00:00:02 /usr/lib/rtkit/rtkit-daemon
gdm 1287 1186 0 Feb11 tty1 00:00:00 ibus-daemon --xim --panel disabl
gdm 1290 1287 0 Feb11 tty1 00:00:00 /usr/lib/ibus/ibus-dconf
gdm 1293 1 0 Feb11 tty1 00:00:00 /usr/lib/ibus/ibus-x11 --kill-da
gdm 1298 1133 0 Feb11 ? 00:00:00 /usr/lib/ibus/ibus-portal
root 1303 1 0 Feb11 ? 00:00:00 /usr/lib/x86_64-linux-gnu/boltd
gdm 1305 1155 0 Feb11 tty1 00:00:00 /usr/lib/gnome-settings-daemon/g
root 1306 1 0 Feb11 ? 00:00:26 /usr/lib/packagekit/packagekitd
gdm 1315 1155 0 Feb11 tty1 00:00:00 /usr/lib/gnome-settings-daemon/g
gdm 1319 1155 0 Feb11 tty1 00:00:00 /usr/lib/gnome-settings-daemon/g
gdm 1322 1155 0 Feb11 tty1 00:01:16 /usr/lib/gnome-settings-daemon/g
gdm 1323 1155 0 Feb11 tty1 00:00:00 /usr/lib/gnome-settings-daemon/g
gdm 1325 1133 0 Feb11 ? 00:00:00 /usr/lib/dconf/dconf-service
gdm 1328 1155 0 Feb11 tty1 00:00:00 /usr/lib/gnome-settings-daemon/g
gdm 1331 1155 0 Feb11 tty1 00:00:00 /usr/lib/gnome-settings-daemon/g
gdm 1333 1155 0 Feb11 tty1 00:00:01 /usr/lib/gnome-settings-daemon/g
gdm 1336 1155 0 Feb11 tty1 00:00:00 /usr/lib/gnome-settings-daemon/g
gdm 1337 1155 0 Feb11 tty1 00:00:02 /usr/lib/gnome-settings-daemon/g
gdm 1340 1155 0 Feb11 tty1 00:00:00 /usr/lib/gnome-settings-daemon/g
gdm 1341 1155 0 Feb11 tty1 00:00:00 /usr/lib/gnome-settings-daemon/g
gdm 1344 1155 0 Feb11 tty1 00:00:00 /usr/lib/gnome-settings-daemon/g
gdm 1347 1155 0 Feb11 tty1 00:00:00 /usr/lib/gnome-settings-daemon/g
gdm 1348 1155 0 Feb11 tty1 00:00:00 /usr/lib/gnome-settings-daemon/g
gdm 1356 1155 0 Feb11 tty1 00:00:00 /usr/lib/gnome-settings-daemon/g
gdm 1359 1155 0 Feb11 tty1 00:00:00 /usr/lib/gnome-settings-daemon/g
gdm 1370 1287 0 Feb11 tty1 00:00:00 /usr/lib/ibus/ibus-engine-simple
colord 1405 1 0 Feb11 ? 00:00:00 /usr/lib/colord/colord
root 1439 1076 0 Feb11 ? 00:00:00 gdm-session-worker [pam/gdm-pass
pratik 1442 1 0 Feb11 ? 00:00:03 /lib/systemd/systemd --user
pratik 1443 1442 0 Feb11 ? 00:00:00 (sd-pam)
pratik 1456 1 0 Feb11 ? 00:00:00 /usr/bin/gnome-keyring-daemon --
pratik 1460 1439 0 Feb11 tty2 00:00:00 /usr/lib/gdm3/gdm-x-session --ru
pratik 1462 1460 1 Feb11 tty2 01:46:55 /usr/lib/xorg/Xorg vt2 -displayf
pratik 1466 1442 0 Feb11 ? 00:00:12 /usr/bin/dbus-daemon --session -
pratik 1469 1460 0 Feb11 tty2 00:00:05 /usr/lib/gnome-session/gnome-ses
pratik 1564 1469 0 Feb11 ? 00:00:01 /usr/bin/ssh-agent /usr/bin/im-l
pratik 1566 1442 0 Feb11 ? 00:00:00 /usr/lib/at-spi2-core/at-spi-bus
pratik 1571 1566 0 Feb11 ? 00:00:06 /usr/bin/dbus-daemon --config-fi
pratik 1573 1442 0 Feb11 ? 00:00:47 /usr/lib/at-spi2-core/at-spi2-re
pratik 1590 1469 1 Feb11 tty2 02:41:40 /usr/bin/gnome-shell
pratik 1596 1442 0 Feb11 ? 00:00:00 /usr/lib/gvfs/gvfsd
pratik 1601 1442 0 Feb11 ? 00:00:00 /usr/lib/gvfs/gvfsd-fuse /run/us
pratik 1612 1 0 Feb11 ? 00:45:52 /usr/bin/pulseaudio --start --lo
root 1616 2 0 Feb11 ? 00:00:00 [krfcommd]
pratik 1628 1590 0 Feb11 tty2 00:02:18 ibus-daemon --xim --panel disabl
pratik 1632 1628 0 Feb11 tty2 00:00:00 /usr/lib/ibus/ibus-dconf
pratik 1635 1 0 Feb11 tty2 00:00:00 /usr/lib/ibus/ibus-x11 --kill-da
pratik 1637 1442 0 Feb11 ? 00:00:00 /usr/lib/ibus/ibus-portal
pratik 1648 1442 0 Feb11 ? 00:00:00 /usr/lib/gnome-shell/gnome-shell
pratik 1657 1442 0 Feb11 ? 00:00:11 /usr/lib/gvfs/gvfs-udisks2-volum
pratik 1661 1442 0 Feb11 ? 00:00:00 /usr/lib/evolution/evolution-sou
pratik 1665 1442 0 Feb11 ? 00:00:00 /usr/lib/gvfs/gvfs-gphoto2-volum
pratik 1673 1442 0 Feb11 ? 00:00:00 /usr/lib/gvfs/gvfs-goa-volume-mo
pratik 1676 1442 0 Feb11 ? 00:00:00 /usr/lib/gnome-online-accounts/g
pratik 1685 1442 0 Feb11 ? 00:00:00 /usr/lib/gnome-online-accounts/g
pratik 1689 1442 0 Feb11 ? 00:00:00 /usr/lib/gvfs/gvfs-afc-volume-mo
pratik 1697 1442 0 Feb11 ? 00:00:00 /usr/lib/gvfs/gvfs-mtp-volume-mo
pratik 1701 1469 0 Feb11 tty2 00:00:01 /usr/lib/gnome-settings-daemon/g
pratik 1702 1469 0 Feb11 tty2 00:00:05 /usr/lib/gnome-settings-daemon/g
pratik 1705 1469 0 Feb11 tty2 00:00:01 /usr/lib/gnome-settings-daemon/g
pratik 1709 1469 0 Feb11 tty2 00:00:01 /usr/lib/gnome-settings-daemon/g
pratik 1712 1469 0 Feb11 tty2 00:00:03 /usr/lib/gnome-settings-daemon/g
pratik 1718 1469 0 Feb11 tty2 00:00:29 /usr/lib/gnome-settings-daemon/g
pratik 1722 1469 0 Feb11 tty2 00:00:01 /usr/lib/gnome-settings-daemon/g
pratik 1725 1469 0 Feb11 tty2 00:00:01 /usr/lib/gnome-settings-daemon/g
pratik 1727 1469 0 Feb11 tty2 00:00:02 /usr/lib/gnome-settings-daemon/g
pratik 1730 1469 0 Feb11 tty2 00:00:02 /usr/lib/gnome-settings-daemon/g
pratik 1741 1469 0 Feb11 tty2 00:00:01 /usr/lib/gnome-settings-daemon/g
pratik 1745 1469 0 Feb11 tty2 00:00:01 /usr/lib/gnome-settings-daemon/g
pratik 1747 1469 0 Feb11 tty2 00:00:02 /usr/lib/gnome-settings-daemon/g
pratik 1751 1469 0 Feb11 tty2 00:01:17 /usr/lib/gnome-settings-daemon/g
pratik 1752 1469 0 Feb11 tty2 00:00:14 /usr/lib/gnome-settings-daemon/g
pratik 1753 1469 0 Feb11 tty2 00:00:02 /usr/lib/gnome-settings-daemon/g
pratik 1757 1469 0 Feb11 tty2 00:00:08 /usr/lib/gnome-settings-daemon/g
pratik 1767 1 0 Feb11 tty2 00:00:01 /usr/lib/gnome-settings-daemon/g
pratik 1778 1 0 Feb11 tty2 00:00:00 /usr/lib/gnome-settings-daemon/g
pratik 1817 1469 0 Feb11 tty2 00:00:11 nautilus-desktop
pratik 1825 1469 0 Feb11 tty2 00:00:52 /usr/lib/x86_64-linux-gnu/libexe
pratik 1826 1469 0 Feb11 tty2 00:00:00 /usr/lib/gnome-disk-utility/gsd-
pratik 1833 1596 0 Feb11 ? 00:00:00 /usr/lib/gvfs/gvfsd-trash --spaw
pratik 1839 1442 0 Feb11 ? 00:00:00 /usr/lib/dconf/dconf-service
pratik 1843 1442 0 Feb11 ? 00:00:00 /usr/lib/evolution/evolution-cal
pratik 1856 1628 0 Feb11 tty2 00:00:34 /usr/lib/ibus/ibus-engine-simple
pratik 1921 1442 0 Feb11 ? 00:00:00 /usr/lib/gvfs/gvfsd-metadata
pratik 1940 1843 0 Feb11 ? 00:00:01 /usr/lib/evolution/evolution-cal
pratik 1954 1442 0 Feb11 ? 00:00:00 /usr/lib/evolution/evolution-add
pratik 1963 1954 0 Feb11 ? 00:00:00 /usr/lib/evolution/evolution-add
pratik 2311 1469 0 Feb11 tty2 00:00:05 update-notifier
pratik 2314 1469 0 Feb11 tty2 00:02:04 /usr/bin/gnome-software --gappli
root 2332 1 0 Feb11 ? 00:00:07 /usr/lib/fwupd/fwupd
pratik 2424 1469 0 Feb11 tty2 00:00:00 /usr/lib/deja-dup/deja-dup-monit
pratik 2604 1596 0 Feb11 ? 00:00:00 /usr/lib/gvfs/gvfsd-recent --spa
pratik 2761 1596 0 Feb11 ? 00:00:00 /usr/lib/gvfs/gvfsd-network --sp
root 2776 1 0 Feb11 ? 00:00:03 /sbin/mount.ntfs /dev/sda5 /medi
pratik 2807 1596 0 Feb11 ? 00:00:00 /usr/lib/gvfs/gvfsd-dnssd --spaw
pratik 8132 1442 0 Feb17 ? 00:00:00 /usr/lib/libreoffice/program/oos
pratik 8151 8132 0 Feb17 ? 00:00:56 /usr/lib/libreoffice/program/sof
pratik 8280 1442 0 Feb17 ? 00:00:05 evince /media/pratik/New Volume/
pratik 8286 1442 0 Feb17 ? 00:00:00 /usr/lib/evince/evinced
root 9075 2 0 Feb17 ? 00:00:01 [kworker/0:1]
root 10321 1 0 00:08 ? 00:00:00 /usr/sbin/cupsd -l
root 10322 1 0 00:08 ? 00:00:00 /usr/sbin/cups-browsed
root 11438 2 0 01:12 ? 00:00:00 [kworker/2:1]
root 11603 2 0 09:29 ? 00:00:01 [kworker/u8:38]
root 11633 2 0 09:29 ? 00:00:00 [irq/52-mei_me]
root 11751 926 0 09:30 ? 00:00:00 /sbin/dhclient -d -q -sf /usr/li
pratik 12415 1 3 09:35 tty2 00:03:11 /usr/lib/firefox/firefox -new-wi
pratik 12474 12415 0 09:35 tty2 00:00:42 /usr/lib/firefox/firefox -conten
pratik 12521 12415 0 09:35 tty2 00:00:12 /usr/lib/firefox/firefox -conten
pratik 12585 12415 0 09:35 tty2 00:00:00 /usr/bin/python3 /usr/bin/chrome
root 12911 2 0 10:12 ? 00:00:00 [kworker/u8:1]
pratik 12931 12415 0 10:15 tty2 00:00:13 /usr/lib/firefox/firefox -conten
pratik 13005 1442 0 10:18 ? 00:00:06 /usr/lib/gnome-terminal/gnome-te
pratik 13014 13005 0 10:18 pts/0 00:00:00 bash
pratik 13022 13014 0 10:19 pts/0 00:00:00 script OsPractical
pratik 13023 13022 0 10:19 pts/1 00:00:00 bash -i
root 13149 2 0 10:30 ? 00:00:00 [kworker/1:3]
pratik 13212 12415 0 10:39 tty2 00:00:11 /usr/lib/firefox/firefox -conten
pratik 13318 12415 1 10:45 tty2 00:00:22 /usr/lib/firefox/firefox -conten
root 13380 2 0 10:47 ? 00:00:00 [kworker/u8:2]
root 13401 2 0 10:52 ? 00:00:00 [kworker/1:1]
root 13405 2 0 10:53 ? 00:00:00 [kworker/3:0]
root 13519 2 0 10:58 ? 00:00:00 [kworker/1:0]
root 13528 2 0 10:59 ? 00:00:00 [kworker/0:0]
root 13529 2 0 10:59 ? 00:00:00 [kworker/2:0]
root 13530 2 0 10:59 ? 00:00:00 [kworker/3:1]
root 13559 2 0 11:02 ? 00:00:00 [kworker/1:2]
root 13576 2 0 11:04 ? 00:00:00 [kworker/u8:0]
root 13577 2 0 11:04 ? 00:00:00 [kworker/2:2]
pratik 13578 13023 0 11:04 pts/1 00:00:00 ps -ef
root 14550 2 0 Feb12 ? 00:00:00 [xfsalloc]
root 14551 2 0 Feb12 ? 00:00:00 [xfs_mru_cache]
root 14564 2 0 Feb12 ? 00:00:00 [jfsIO]
root 14565 2 0 Feb12 ? 00:00:00 [jfsCommit]
root 14566 2 0 Feb12 ? 00:00:00 [jfsCommit]
root 14567 2 0 Feb12 ? 00:00:00 [jfsCommit]
root 14568 2 0 Feb12 ? 00:00:00 [jfsCommit]
root 14569 2 0 Feb12 ? 00:00:00 [jfsSync]
root 21895 2 0 Feb12 ? 00:00:00 [kworker/u9:0]
pratik 22962 1442 0 Feb12 ? 00:00:00 /usr/bin/zeitgeist-daemon
pratik 22978 1442 0 Feb12 ? 00:00:00 /usr/lib/zeitgeist/zeitgeist/zei
root 24121 2 0 Feb15 ? 00:00:00 [loop23]
root 24183 1 0 Feb15 ? 00:01:07 /usr/lib/snapd/snapd
root 24401 2 0 Feb15 ? 00:00:00 [loop12]
root 24505 2 0 Feb15 ? 00:00:00 [loop24]
root 24889 2 0 Feb15 ? 00:00:00 [loop18]
root 30264 1 0 Feb13 ? 00:00:49 /sbin/mount.ntfs /dev/sda6 /medi
root 32575 2 0 Feb17 ? 00:00:00 [kworker/u9:2]
pratik@pratik-Inspiron-3543:~$ kill 32575
bash: kill: (32575) - Operation not permitted
pratik@pratik-Inspiron-3543:~$
pratik@pratik-Inspiron-3543:~$ kill 13578
bash: kill: (13578) - No such process
pratik@pratik-Inspiron-3543:~$ kill 13022
Session terminated.
pratik@pratik-Inspiron-3543:~$ ^C
top - 11:34:18 up 7 days, 2:29, 1 user, load average: 0.52, 0.50, 0.43
Tasks: 285 total, 2 running, 229 sleeping, 0 stopped, 0 zombie
%Cpu(s): 19.0 us, 2.9 sy, 0.0 ni, 75.5 id, 2.5 wa, 0.0 hi, 0.1 si, 0.0 st
KiB Mem : 3949224 total, 194912 free, 1929532 used, 1824780 buff/cache
KiB Swap: 8000508 total, 7748108 free, 252400 used. 1369920 avail Mem
• The default editor that comes with the UNIX operating system is called vi (visual
editor). Using vi editor, we can edit an existing file or create a new file from scratch.
we can also use this editor to just read a text file.
• Command Mode: When vi starts up, it is in Command Mode. This mode is where vi
interprets any characters we type as commands and thus does not display them in the
window. This mode allows us to move through a file, and to delete, copy, or paste a
piece of text.
To enter into Command Mode from any other mode, it requires pressing the [Esc] key.
If we press [Esc] when we are already in Command Mode, then vi will beep or flash the
screen.
• Insert mode: This mode enables you to insert text into the file. Everything that’s typed
in this mode is interpreted as input and finally, it is put in the file. The vi always starts
in command mode. To enter text, you must be in insert mode. To come in insert mode
you simply type i. To get out of insert mode, press the Esc key, which will put you back
into command mode.
• Last Line Mode(Escape Mode): Line Mode is invoked by typing a colon [:], while vi is in
Command Mode. The cursor will jump to the last line of the screen and vi will wait for
a command. This mode enables you to perform tasks such as saving files, executing
commands.
• Usually shells are interactive that mean, they accept command as input from users and
execute them. However some time we want to execute a bunch of commands routinely,
so we have type in all commands each time in terminal.
As shell can also take commands as input from file we can write these commands in a
file and can execute them in shell to avoid this repetitive work. These files are called
Shell Scripts or Shell Programs. Shell scripts are similar to the batch filein MS-DOS.
Each shell script is saved with .sh file extension eg. myscript.sh
• A shell script have syntax just like any other programming language. If you have any
prior experience with any programming language like Python, C/C++ etc. it would be
very easy to get started with it.
A shell script comprises following elements –
• Shell Keywords – if, else, break etc.
• Shell commands – cd, ls, echo, pwd, touch etc.
• Functions
• Control flow – if..then..else, case and shell loops etc.
Why do we need shell scripts
There are many reasons to write shell scripts –
• To avoid repetitive work and automation
• System admins use shell scripting for routine backups
• System monitoring
• Adding new functionality to the shell etc.
Advantages of shell scripts
• The command and syntax are exactly the same as those directly entered in command
line, so programmer do not need to switch to entirely different syntax
• Writing shell scripts are much quicker
• Quick start
• Interactive debugging etc.
Disadvantages of shell scripts
• Prone to costly errors, a single mistake can change the command which might be
harmful
• Slow execution speed
• Design flaws within the language syntax or implementation
• Not well suited for large and complex task
• Provide minimal data structure unlike other scripting languages. etc
Simple demo of shell scripting using Bash Shell
If you work on terminal, something you traverse deep down in directories. Then for coming
few directories up in path we have to execute command like this as shown below to get to the
“python” directory .
function jump()
{
# original value of Internal Field Separator
OLDIFS=$IFS
# setting field separator to "/"
IFS=/
# converting working path into array of directories in path
# eg. /my/path/is/like/this
# into [, my, path, is, like, this]
path_arr=($PWD)
# setting IFS to original value
IFS=$OLDIFS
local pos=-1
# ${path_arr[@]} gives all the values in path_arr
for dir in "${path_arr[@]}"
do
# find the number of directories to move up to
# reach at target directory
pos=$[$pos+1]
if [ "$1" = "$dir" ];then
# length of the path_arr
dir_in_path=${#path_arr[@]}
#current working directory
cwd=$PWD
limit=$[$dir_in_path-$pos-1]
for ((i=0; i<limit; i++))
do
cwd=$cwd/..
done
cd $cwd
break
fi
done
}
PRACTICAL-8
#include<iostream>
#include <bits/stdc++.h>
using namespace std;
struct process
{
string Process;
int Arrt;
int burst;
int TAT;
int WT;
int exit;
};
bool compareTwoprocesses(process a, process b)
{
if (a.Arrt!=b.Arrt)
return a.Arrt < b.Arrt;
}
int main()
{
int n;
cout<<"Enter the number of processes"<<endl;
cin>>n;
struct process P[n];
for(int i=0;i<n;i++)
{
cout<<"Enter Process"<<i+1<<endl;
cin>>P[i].Process;
cout<<"Enter Arrival Time of Process"<<i+1<<endl;
cin>>P[i].Arrt;
cout<<"Enter Burst Time of Process"<<i+1<<endl;
cin>>P[i].burst;
}
sort(P,P+n,compareTwoprocesses);
for(int i=0;i<n;i++)
{
cout<<P[i].Process<<" is executed "<<endl;
if(i==0)
P[i].exit=P[i].Arrt+P[i].burst;
else
P[i].exit=P[i-1].exit+P[i].burst;
P[i].TAT=P[i].exit-P[i].Arrt;
P[i].WT=P[i].TAT-P[i].burst;
cout<<" Turn around Time "<<P[i].TAT<<endl;
cout<<" Waiting Time "<<P[i].WT<<endl;
}
cout<<endl;
float avgWT=0;
for(int i=0;i<n;i++)
{
avgWT+=P[i].WT;
}
cout<<"Average Waiting Time "<<(avgWT/n)<<endl;
}
OUTPUT
SJF(Shortest Job First)
[Non-Priemptive]
#include<iostream>
#include <bits/stdc++.h>
using namespace std;
struct process
{
string Process;
int Arrt;
int burst;
int TAT;
int WT;
int exit;
};
bool compareTwoprocesses1(process a, process b)
{
if (a.Arrt!=b.Arrt)
return a.Arrt < b.Arrt;
else
return a.burst<b.burst;
}
bool compareTwoprocesses2(process a, process b)
{
if (a.burst!=b.burst)
return a.burst < b.burst;
}
int main()
{
int n;
cout<<"Enter the number of processes"<<endl;
cin>>n;
struct process P[n];
for(int i=0;i<n;i++)
{
cout<<"Enter Process"<<i+1<<endl;
cin>>P[i].Process;
cout<<"Enter Arrival Time of Process"<<i+1<<endl;
cin>>P[i].Arrt;
cout<<"Enter Burst Time of Process"<<i+1<<endl;
cin>>P[i].burst;
}
int j=0;
sort(P,P+n,compareTwoprocesses1);
cout<<P[j].Process<<" is executed "<<endl;
P[j].exit=P[j].Arrt+P[j].burst;
P[j].TAT=P[j].exit-P[j].Arrt;
P[j].WT=P[j].TAT-P[j].burst;
cout<<" Turn around Time "<<P[j].TAT<<endl;
cout<<" Waiting Time "<<P[j].WT<<endl;
sort(P+1,P+n,compareTwoprocesses2);
for(int i=1;i<n;i++)
{
cout<<P[i].Process<<" is executed "<<endl;
P[i].exit=P[i-1].exit+P[i].burst;
P[i].TAT=P[i].exit-P[i].Arrt;
P[i].WT=P[i].TAT-P[i].burst;
cout<<" Turn around Time "<<P[i].TAT<<endl;
cout<<" Waiting Time "<<P[i].WT<<endl;
}
cout<<endl;
float avgWT=0;
for(int i=0;i<n;i++)
{
avgWT+=P[i].WT;
}
cout<<"Average Waiting Time "<<(avgWT/n)<<endl;
}
OUTPUT
SJF(Shortest Job First)
[Priemptive]
#include <stdio.h>
int main()
{
int a[10],b[10],x[10],i,j,smallest,count=0,time,n;
double avg=0,tt=0,end;
printf("enter the number of Processes:\n");
scanf("%d",&n);
printf("enter arrival time\n");
for(i=0;i<n;i++)
scanf("%d",&a[i]);
printf("enter burst time\n");
for(i=0;i<n;i++)
scanf("%d",&b[i]);
for(i=0;i<n;i++)
x[i]=b[i];
b[9]=9999;
for(time=0;count!=n;time++)
{
smallest=9;
for(i=0;i<n;i++)
{
if(a[i]<=time && b[i]<b[smallest] && b[i]>0 )
smallest=i;
}
b[smallest]--;
if(b[smallest]==0)
{
count++;
end=time+1;
avg=avg+end-a[smallest]-x[smallest];
tt= tt+end-a[smallest];
}
}
printf("\n\nAverage waiting time = %lf\n",avg/n);
printf("Average Turnaround time = %lf",tt/n);
return 0;
}
OUTPUT
Priority Scheduling
[Non-Priemptive]
#include <iostream>
using namespace std;
int main()
{
int n;
cout<<"enter your total no. of process ";
cin>>n;
float total,wait[n];
float p[n],twaiting=0,waiting=0;
int proc;
int stack[n];
float brust[n],arrival[n],sbrust,temp[n],top=n,prority[n];
int i;
for(i=0;i<n;i++)
{
p[i]=i;
stack[i]=i;
cout<<"\nenter artival time "<<i+1<<": ";
cin>>arrival[i];
cout<<"enter brust time "<<i+1<<": ";
cin>>brust[i];
cout<<"enter prority time "<<i+1<<": ";
cin>>prority[i];
cout<<"\n";
temp[i]=arrival[i];
sbrust=brust[i]+sbrust;
}
for(i=0;i<sbrust;i++)
{
//section 1
proc=stack[0];
if(temp[proc]==i)
{
twaiting=0;
}
else
{
twaiting=i-(temp[proc]);
}
temp[proc]=i+1;
wait[proc]=wait[proc]+twaiting;
waiting=waiting+(twaiting);
brust[proc]=brust[proc]-1;
if(brust[proc]==0)
{
for(int x=0;x<top-1;x++)
{
stack[x]=stack[x+1];
}
top=top-1;
for(int z=0;z<top-1;z++)
{
if((prority[stack[0]]>prority[stack[z+1]]) &&
(arrival[stack[z+1]] <= i+1))
{
int t=stack[0];
stack[0]=stack[z+1];
stack[z+1]=t;
}
}
}
}
cout<<"\nAverage waiting time is: "<<waiting/n;
float tu=(sbrust+waiting)/n;
cout<<endl<<"Average turnaround time is: "<<tu;
return 0;
}
OUTPUT
Priority Scheduling
[Priemptive]
#include<iostream>
using namespace std;
int main()
{
int
bt[20],p[20],wt[20],tat[20],pr[20],i,j,n,total=0,pos,temp,avg_wt,a
vg_tat;
cout<<"Enter Total Number of Process:";
cin>>n;
cout<<"\nEnter Burst Time and Priority\n";
for(i=0;i<n;i++)
{
cout<<"\nP["<<i+1<<"]\n";
cout<<"Burst Time:";
cin>>bt[i];
cout<<"Priority:";
cin>>pr[i];
p[i]=i+1;
}
for(i=0;i<n;i++)
{
pos=i;
for(j=i+1;j<n;j++)
{
if(pr[j]<pr[pos])
pos=j;
}
temp=pr[i];
pr[i]=pr[pos];
pr[pos]=temp;
temp=bt[i];
bt[i]=bt[pos];
bt[pos]=temp;
temp=p[i];
p[i]=p[pos];
p[pos]=temp;
}
wt[0]=0;
for(i=1;i<n;i++)
{
wt[i]=0;
for(j=0;j<i;j++)
wt[i]+=bt[j];
total+=wt[i];
}
avg_wt=total/n;
total=0;
cout<<"\nProcess\t Burst Time \tWaiting Time\tTurnaround
Time";
for(i=0;i<n;i++)
{
tat[i]=bt[i]+wt[i];
total+=tat[i];
cout<<"\nP["<<p[i]<<"]\t\t "<<bt[i]<<"\t\t
"<<wt[i]<<"\t\t\t"<<tat[i];
}
avg_tat=total/n;
cout<<"\n\nAverage Waiting Time="<<avg_wt;
cout<<"\nAverage Turnaround Time="<<avg_tat;
return 0;
}
OUTPUT
Round-Robin
#include <iostream>
using namespace std;
int main()
{
cout<<"Enter the number of processes: ";
int nProc=0;
cin>>nProc;
cout<<"Enter the burst times of processes: ";
int data[10][5];
for(int i =0;i<nProc;++i)
{
cin>>data[i][0];
data[i][1]=data[i][0]; //for burst time subtractions
data[i][2]=0; //for waiting times
data[i][3]=0; //for turn around times
data[i][4]=0; //for status of processes: whether completed or
not
}
int time=0;
cout<<"Enter time quantum: ";
cin>>time;
while(1)
{
bool resume = 0;
for(int i =0;i<nProc;++i)
{
if(data[i][4]==0)
{
resume = 1;
break;
}
}
if(resume)
{
for(int i =0;i<nProc;++i)
{
if(data[i][1]<=time)
{
for(int j=0;j<nProc;++j)
{
if(i==j)
continue;
else if(data[j][4]==0)
data[j][2]+=data[i][1];
}
data[i][1]=0;
data[i][4]=1;
}
else if(data[i][1]>time)
{
data[i][1]-=time;
for(int j =0;j<nProc;++j)
{
if(i==j)
continue;
else if(data[j][4]==0)
data[j][2]+=time;
}
}
}
}
else if(!resume)
break;
}
OUTPUT
PRACTICAL-10
#include<stdio.h>
#include<stdlib.h>
int avail[10],maxim[20][20],allo[20][20],m,n,need[20][20];
void accept()
{
int i,j,val;
for(i=0;i<n;i++)
{
for(j=0;j<m;j++)
{
printf("\nENTER THE MAX REQUIRED VALUE for P%d,R%d:
",i,j);
loop: scanf("%d",&val);
if(val>avail[j])
{
printf("ERROR!!THE ENTERED VALUE IS GREATER THAN
THE AVAILABLE VALUE i.e %d .PLZ ENTER THE VALUE AGAIN:
",avail[j]);
goto loop;
}
else
maxim[i][j]=val;
}
}
}
void rollback(int roll[],int pro)
{
int k;
for(k=0;k<m;k++)
{
avail[k]=avail[k]+roll[k];
allo[pro][k]=allo[pro][k]-roll[k];
need[pro][k]=allo[pro][k]+roll[k];
printf("\nWE ARE ROLLING BACK");
}
int safety()
{
int i,j,work[10],finish[10],flag=0,k,cnt=0,cn,flag1=0,ans;
//char ans;
printf("\nTHE ALTERED ALLOCATION TABLE IS:\n");
printf("PROCESS");
for(i=0;i<m;i++)
{
printf("\tR%d\t",i);
}
printf("\n");
for(i=0;i<n;i++)
{
printf("\nP%d\t",i);
for(j=0;j<m;j++)
{
printf("%d\t\t",allo[i][j]);
}
}
j=0;
for(i=0;i<m;i++)
{
work[j]=avail[i];
j++;
}
for(i=0;i<n;i++)
{
finish[i]=0;
while(cnt<=10)
{
for(i=0;i<n;i++)
{
if(finish[i]==0)
{
for(j=0;j<m;j++)
{
if(need[i][j]<=work[j])
{
flag=1;
}
else
{
flag=0;
break;
}
}
if(flag==1)
{
}
}
}
for(cn=0;cn<n;cn++)
{
if(finish[cn]==1)
{
flag1=1;
}
else
{
flag1=0;
break;
}
}
cnt++;
if(flag1==1)
{
printf("\nTHE SYSTEM IS IN SAFE STATE\n");
ans=0;
break;
}
}//end of while
if(flag1==0)
{
printf("\nTHE SYSTEM IS NOT IN SAFE STATE\n");
ans=1;
}
return ans;
}
void request()
{
int pro,val,i,ans1,k,roll[10];
char ans;
while(1)
{
printf("\nDO YOU HAVE A REQUEST?(y/n)");
scanf("%c",&ans);
scanf("%c",&ans);
k=0;
if(ans=='y'||ans=='Y')
{
printf("ENTER THE PROCESS REQUESTING(0,1,2,3..): ");
scanf("%d",&pro);
for(i=0;i<m;i++)
{
printf("ENTER THE REQUIRED VALUE OF RESOURCE R%d:
",i);
loop1: scanf("%d",&val);
if(val>maxim[pro][i])
{
printf("ERROR!!THE ENTERED VALUE IS GREATER THAN
THE MAX VALUE REQD. i.e %d .PLZ ENTER THE VALUE AGAIN:
",maxim[pro][i]);
goto loop1;
}
else
{
allo[pro][i]=allo[pro][i]+val;
avail[i]=avail[i]-val;
need[pro][i]=need[pro][i]-val;
roll[k]=val;
k++;
}
}
ans1=safety();
if(ans1==1)
{
rollback(roll,pro);
}
}
else
{
exit(0);
}
}
int main()
{
int i,val,j;
printf("\nWELCOME TO BANKER'S ALGORITHM\n");
printf("\nENTER THE NUMBER OF RESOURCES: ");
scanf("%d",&m);
printf("\nENTER THE NUMBER OF PROCESS(s): ");
scanf("%d",&n);
for(i=0;i<m;i++)
{
printf("\nENTER THE MAX AVAILABLE VALUE FOR RESOURCE R%d:
",i);
scanf("%d",&val);
avail[i]=val;
}
for(i=0;i<n;i++)
{
for(j=0;j<m;j++)
{
allo[i][j]=0;
}
}
accept();
printf("\nTHE TABLE ENTERED FOR MAX NEEDED IS:\n");
printf("PROCESS");
for(i=0;i<m;i++)
{
printf("\tR%d\t",i);
}
printf("\n");
for(i=0;i<n;i++)
{
printf("\nP%d\t",i);
for(j=0;j<m;j++)
{
printf("%d\t\t",maxim[i][j]);
}
}
for(i=0;i<n;i++)
{
for(j=0;j<m;j++)
{
need[i][j]=maxim[i][j]-allo[i][j];
}
}
request();
return 0;
}
OUTPUT
PRACTICAL-11
First-Fit
#include<iostream>
#include <vector>
using namespace std;
int main()
{
int n1,n2,n3,count=0;
cout<<"Enter the total memory u want to allocate "<<endl;
cin>>n3;
cout<<"Enter the sizes of each blocks "<<endl;
vector<int> block_size;
for(int i=0;count<n3;i++)
{
int n4;
cout<<"Size of Block "<<i+1<<endl;
cin>>n4;
if(count+n4>n3)
{
cout<<"Cannot Accomodate "<<endl;
break;
}
block_size.push_back(n4);
count=count+block_size[i];
}
cout<<"Enter the no of process "<<endl;
cin>>n2;
int process[n2];
for(int i=0;i<n2;i++)
{
cout<<"Process "<<i+1<<endl;
cin>>process[i];
}
for(int i=0;i<n2;i++)
{
for(int j=0;j<block_size.size();j++)
{
if(block_size[j]>=process[i])
{
block_size[j]=block_size[j]-process[i];
cout<<"Process "<<i+1<<"in block "<<j+1<<endl;
break;
}
}
}
OUTPUT
Best-Fit
#include<iostream>
#include <vector>
using namespace std;
int main()
{
int n1,n2,n3,count=0;
cout<<"Enter the total memory u want to allocate "<<endl;
cin>>n3;
cout<<"Enter the sizes of each blocks "<<endl;
vector<int> block_size;
for(int i=0;count<n3;i++)
{
int n4;
cout<<"Size of Block "<<i+1<<endl;
cin>>n4;
if(count+n4>n3)
{
cout<<"Cannot Accomodate "<<endl;
break;
}
block_size.push_back(n4);
count=count+block_size[i];
}
cout<<"Enter the no of process "<<endl;
cin>>n2;
int process[n2];
for(int i=0;i<n2;i++)
{
cout<<"Process "<<i+1<<endl;
cin>>process[i];
}
int index;
for(int i=0;i<n2;i++)
{
for(int j=0;j<block_size.size();j++)
{
if(block_size[j]>=process[i])
{
int min=9999;
for(int k=0;k<block_size.size();k++)
{
int a=block_size[k]-process[i];
if(a<min && a>=0)
{
min=a;
index=k;
}
}
block_size[index]=min;
cout<<"Process "<<i+1<<"in block "<<index+1<<endl;
break;
}
}
}
}
OUTPUT
Worst-Fit
#include<iostream>
#include <vector>
using namespace std;
int main()
{
int n1,n2,n3,count=0;
cout<<"Enter the total memory u want to allocate "<<endl;
cin>>n3;
cout<<"Enter the sizes of each blocks "<<endl;
vector<int> block_size;
for(int i=0;count<n3;i++)
{
int n4;
cout<<"Size of Block "<<i+1<<endl;
cin>>n4;
if(count+n4>n3)
{
cout<<"Cannot Accomodate "<<endl;
break;
}
block_size.push_back(n4);
count=count+block_size[i];
}
cout<<"Enter the no of process "<<endl;
cin>>n2;
int process[n2];
for(int i=0;i<n2;i++)
{
cout<<"Process "<<i+1<<endl;
cin>>process[i];
}
int index;
for(int i=0;i<n2;i++)
{
for(int j=0;j<block_size.size();j++)
{
if(block_size[j]>=process[i])
{
int max=0;
for(int k=0;k<block_size.size();k++)
{
int a=block_size[k]-process[i];
if(a>max && a>=0)
{
max=a;
index=k;
}
}
block_size[index]=max;
cout<<"Process "<<i+1<<"in block "<<index+1<<endl;
break;
}
}
}
}
OUTPUT
PRACTICAL-12
return page_faults;
}
int main()
{
int pages[] = {7, 1, 1, 0, 2, 3, 0, 4,
2, 3, 0, 3, 2, 5, 6};
int n = sizeof(pages)/sizeof(pages[0]);
int capacity = 3;
cout << pageFaults(pages, n, capacity);
return 0;
}
OUTPUT
#include <bits/stdc++.h>
using namespace std;
bool search(int key, vector<int>& fr)
{
for (int i = 0; i < fr.size(); i++)
if (fr[i] == key)
return true;
return false;
}
int check(int pg[], vector<int>& fr, int pn, int index)
{
int res = -1, farthest = index;
for (int i = 0; i < fr.size(); i++) {
int j;
for (j = index; j < pn; j++) {
if (fr[i] == pg[j]) {
if (j > farthest) {
farthest = j;
res = i;
}
break;
}
}
if (j == pn)
return i;
}
return (res == -1) ? 0 : res;
}
}
int main()
{
int pg[] = { 7, 0, 1, 2, 0, 3, 0, 4, 2, 3, 0, 3, 2 ,5, 6};
int pn = sizeof(pg) / sizeof(pg[0]);
int fn = 3;
optimal(pg, pn, fn);
return 0;
}
OUTPUT
LRU(Least Recently Used) Page Replacement
#include<bits/stdc++.h>
using namespace std;
int pageFaults(int pages[], int n, int capacity)
{
unordered_set<int> s;
unordered_map<int, int> indexes;
int page_faults = 0;
for (int i=0; i<n; i++)
{
if (s.size() < capacity)
{
if (s.find(pages[i])==s.end())
{
s.insert(pages[i]);
page_faults++;
}
indexes[pages[i]] = i;
}
else
{
if (s.find(pages[i]) == s.end())
{
int lru = INT_MAX, val;
for (auto it=s.begin(); it!=s.end(); it++)
{
if (indexes[*it] < lru)
{
lru = indexes[*it];
val = *it;
}
}
s.erase(val);
s.insert(pages[i]);
page_faults++;
}
indexes[pages[i]] = i;
}
}
return page_faults;
}
int main()
{
int pages[] = {7, 0, 1, 2, 0, 3, 0, 4, 2, 3, 0, 3, 2, 5, 6};
int n = sizeof(pages)/sizeof(pages[0]);
int capacity = 3;
cout << "Total no of Page fault in LRU is "<<pageFaults(pages,
n, capacity);
return 0;
}
OUTPUT