Unix was created in 1969 by Ken Thompson at Bell Labs to allow multiple users to access a computer simultaneously. It features a multi-user design, hierarchical file system, and shell interface. The kernel handles memory management, process scheduling, and device interactions to enable these features. Common Unix commands like cat, ls, cp and rm allow users to work with files and directories from the shell. File permissions and ownership are managed through inodes to control access across users.
18 LINUX OS.pptx Linux command is basic ismaperweeng31
Linux is an open-source, Unix-like operating system developed from the Linux kernel initiated by Linus Torvalds in 1991, comprised of three main components: the kernel, system libraries, and system utilities. Key features include portability, multi-user capabilities, a hierarchical file system, and strong security measures. The document also details fundamental Linux commands for file management and introduces the vi text editor, along with an overview of the X Window System for graphical interfaces.
The document provides an overview of operating systems, particularly focusing on the Unix operating system, defining key components such as the kernel and shell. It discusses the architecture of Unix, including its multiuser capabilities, file system structure, and security features, while also detailing various Unix commands related to file management and system operations. Additionally, the text explains file permissions and administrative commands, illustrating how users interact with the system through command-line interfaces.
Rishav Mishra final presentation on UNIX Final.pptxrishavmishra041
The document provides an overview of Unix/Linux, detailing its origins, free software principles, system structure including kernel and shell, and the file and directory organization. It explains essential commands for file and directory management, user interface operations, and concepts like permissions and redirection of input/output. Furthermore, it highlights the importance of POSIX compliance and outlines the historical development of Linux since its inception by Linus Torvalds in 1991.
The document provides a comprehensive overview of managing the Linux file system, including its hierarchical structure, common file system tasks, and tools for managing disk partitions. Key topics include navigating the file system, managing files and directories, running executables, and searching for files, as well as utilities like fdisk, mkfs, and mount for handling partitions. Additionally, it covers various types of files in Linux and command-line operations necessary for effective system administration.
This document discusses managing the Linux file system. It describes the Linux file system structure, including the main directories like /bin, /home, /etc. It also covers common file system tasks like navigating directories, managing files and directories by creating, deleting, copying and moving files. Additional topics covered include managing disk partitions by creating partitions with fdisk and formatting partitions with file systems using mkfs, mounting partitions, and checking file systems with fsck.
The document discusses the UNIX operating system. It describes UNIX as a stable, multi-user, multi-tasking system used for servers, desktops and laptops. It also discusses the different components that make up the UNIX system, including the kernel, shell, and programs. It explains the directory structure and file hierarchy with the root directory at the top. It provides examples of different types of files and concludes by describing some basic date and time commands in UNIX.
The document provides an overview of the Linux file system structure and common Linux commands. It describes that in Linux, everything is treated as a file, including devices, pipes and directories. It explains the different types of files and partitions in Linux, and provides examples of common file manipulation and system monitoring commands.
This document discusses embedded Linux programming. It covers topics such as what Linux is, the layers in a Linux system including the kernel and user programs, how Linux differs from legacy real-time operating systems, and an agenda for a course on embedded Linux driver development that covers the Linux kernel, memory management, interrupts, and networking. It also provides information on basic Linux command line tools and file permissions.
The document defines an operating system and describes the key components and types of operating systems. It provides details on the differences between Windows and UNIX/Linux operating systems. It also summarizes the architecture of an operating system including the shell and kernel components. Common commands used in UNIX/Linux systems such as ls, cd, pwd are also described.
The document provides information about an upcoming UNIX and Shell Scripting workshop, including contact information for the workshop instructor R. Chockalingam, and covers topics that will be discussed such as the architecture and components of the UNIX operating system, basic UNIX commands, text editors, the file system structure, flags and arguments, and more.
Chapter 2 Introduction to Unix ConceptsMeenalJabde
The document provides an introduction to Unix concepts including:
1. It describes the architecture of Unix as having 4 layers - hardware, kernel, shell commands, and application layer. The kernel interacts with hardware and manages tasks like memory and process scheduling.
2. It lists some basic Unix commands like ls, echo, printf, who, date, passwd, cal and explains how to combine commands using operators like && and ||.
3. It explains Unix files and directories are organized in a hierarchical tree structure with the root directory at the top. There are different types of files like ordinary, special, pipes and symbolic links.
This document provides an overview of the Linux operating system. It discusses that Linux is an open-source operating system that provides a structured file system, multi-user capabilities, and strong security. It describes the Linux file structure with directories like /bin, /boot, /dev, /etc, and explains commands to view processes, manage users and files, and install packages. Network services like Apache web server, OpenSSH, and FTP are also summarized.
- Linux originated as a clone of the UNIX operating system. Key developers included Linus Torvalds and developers from the GNU project.
- Linux is open source, multi-user, and can run on a variety of hardware. It includes components like the Linux kernel, shell, terminal emulator, and desktop environments.
- The document provides information on common Linux commands, files, users/groups, permissions, and startup scripts. It describes the Linux file system and compression/archiving utilities.
Here are the steps to complete the assignment:
1. Login as guest user (password is guest)
2. To find the present working directory: pwd
3. The root directory structure includes: /bin, /dev, /etc, /home, /lib, /root, /sbin, /tmp, /usr etc.
4. A few commands in /bin are: ls, cp, mv, rm, chmod. Commands in /sbin are: ifconfig, route, iptables etc.
5. The guest home directory is /home/guest
6. The permissions of the guest home directory are: drwxr-xr-x
7. To create a new
The document discusses various topics related to Unix system administration including device files, block and character devices, major and minor numbers, the Unix file system structure, partitions, file systems, inodes, mounting and unmounting file systems, disk space usage commands, compression tools, printing files, file system checking, user management commands, the role of init in startup and shutdown, run levels, and backup tools. Some key points include:
1. Device files allow all physical devices like tapes, printers, disks to be accessed as normal files.
2. Block and character devices are distinguished based on whether access is via blocks (block devices) or directly (character devices).
3. Major and minor numbers help the
Unix is a multi-user computer operating system capable of handling activities from multiple users simultaneously. It was originally developed in 1969 at Bell Labs by Ken Thompson and Dennis Ritchie. The Unix operating system acts as an interface between the user and computer, allowing users to run multiple programs simultaneously. It became a leading operating system for commercial enterprises during the 1980s and 1990s.
The document provides an overview of the Linux filesystem, including its hierarchical tree structure with common subdirectories like /bin, /home, and /usr. It discusses useful commands for navigating the filesystem like cd, pwd, and running privileged commands with sudo. The document also compares the Linux and Windows filesystem structures and file types. It introduces package management with apt-get and the power of pipes in Linux.
The document discusses various UNIX file APIs. It describes different file types in UNIX like regular files, directories, FIFO files, device files, and symbolic links. It then explains the open(), read(), write(), close() system calls used to perform operations on files. open() is used to open or create a file. read() reads data from an open file. write() writes data to a file. close() closes an open file. Examples of using these calls are also provided.
Linux is an operating system with several key components:
- A kernel that manages system resources and processes. Processes allow programs to run in memory simultaneously.
- Files and directories that organize data. Directories contain files and other directories.
- Tools like tar for backing up files and mounting disks. The mount command attaches filesystems.
- A shell interface for entering commands to interact with the system, along with utilities like ls, cp, and man.
- Permissions and variables that control access and store values for commands.
The document discusses various types of files in UNIX/Linux systems such as regular files, directory files, device files, FIFO files, and symbolic links. It describes how each file type is created and used. It also covers UNIX file attributes, inodes, and how the kernel manages file access through system calls like open, read, write, and close.
This document provides an overview of Linux system fundamentals including how to install Ubuntu in a virtual machine, basic commands like ls, cat, and sudo, understanding users, home directories and man pages. It explains key Linux concepts such as the kernel, command line interface, and root user and how to switch directories, view files and get help using man pages.
The document provides an overview of the UNIX operating system. It discusses the components of a computer system including hardware, operating system, utilities, and application programs. It then defines the operating system as a program that acts as an interface between the user and computer hardware. The document outlines the goals of an operating system and provides a brief history of the development of UNIX from Multics. It also describes some key concepts of UNIX including the kernel, shell, files, directories, and multi-user capabilities.
Unix operating system architecture with file structure amol_chavan
The document provides information about the Unix operating system, including:
- Unix was originally developed in 1969 at Bell Labs and consists of programs that link the computer and user. There are various commercial and open-source variants available.
- It allows for multi-user access where many users can use the system at once, and multitasking where users can run multiple programs simultaneously.
- The kernel manages hardware interaction, memory, processes, I/O, and enforces access permissions. The shell interprets commands for the kernel to execute programs and utilities like cp, mv, cat, and grep.
- All data is organized into files within a hierarchical directory structure called the file system, with directories like
The document provides an overview of basic computer operating systems concepts. It discusses file management, file systems, directories, paths, file operations, and roles in file management. It also summarizes concepts related to security management, failure management, supervisors, and where to find more information on operating systems.
The document discusses the UNIX operating system. It describes UNIX as a stable, multi-user, multi-tasking system used for servers, desktops and laptops. It also discusses the different components that make up the UNIX system, including the kernel, shell, and programs. It explains the directory structure and file hierarchy with the root directory at the top. It provides examples of different types of files and concludes by describing some basic date and time commands in UNIX.
The document provides an overview of the Linux file system structure and common Linux commands. It describes that in Linux, everything is treated as a file, including devices, pipes and directories. It explains the different types of files and partitions in Linux, and provides examples of common file manipulation and system monitoring commands.
This document discusses embedded Linux programming. It covers topics such as what Linux is, the layers in a Linux system including the kernel and user programs, how Linux differs from legacy real-time operating systems, and an agenda for a course on embedded Linux driver development that covers the Linux kernel, memory management, interrupts, and networking. It also provides information on basic Linux command line tools and file permissions.
The document defines an operating system and describes the key components and types of operating systems. It provides details on the differences between Windows and UNIX/Linux operating systems. It also summarizes the architecture of an operating system including the shell and kernel components. Common commands used in UNIX/Linux systems such as ls, cd, pwd are also described.
The document provides information about an upcoming UNIX and Shell Scripting workshop, including contact information for the workshop instructor R. Chockalingam, and covers topics that will be discussed such as the architecture and components of the UNIX operating system, basic UNIX commands, text editors, the file system structure, flags and arguments, and more.
Chapter 2 Introduction to Unix ConceptsMeenalJabde
The document provides an introduction to Unix concepts including:
1. It describes the architecture of Unix as having 4 layers - hardware, kernel, shell commands, and application layer. The kernel interacts with hardware and manages tasks like memory and process scheduling.
2. It lists some basic Unix commands like ls, echo, printf, who, date, passwd, cal and explains how to combine commands using operators like && and ||.
3. It explains Unix files and directories are organized in a hierarchical tree structure with the root directory at the top. There are different types of files like ordinary, special, pipes and symbolic links.
This document provides an overview of the Linux operating system. It discusses that Linux is an open-source operating system that provides a structured file system, multi-user capabilities, and strong security. It describes the Linux file structure with directories like /bin, /boot, /dev, /etc, and explains commands to view processes, manage users and files, and install packages. Network services like Apache web server, OpenSSH, and FTP are also summarized.
- Linux originated as a clone of the UNIX operating system. Key developers included Linus Torvalds and developers from the GNU project.
- Linux is open source, multi-user, and can run on a variety of hardware. It includes components like the Linux kernel, shell, terminal emulator, and desktop environments.
- The document provides information on common Linux commands, files, users/groups, permissions, and startup scripts. It describes the Linux file system and compression/archiving utilities.
Here are the steps to complete the assignment:
1. Login as guest user (password is guest)
2. To find the present working directory: pwd
3. The root directory structure includes: /bin, /dev, /etc, /home, /lib, /root, /sbin, /tmp, /usr etc.
4. A few commands in /bin are: ls, cp, mv, rm, chmod. Commands in /sbin are: ifconfig, route, iptables etc.
5. The guest home directory is /home/guest
6. The permissions of the guest home directory are: drwxr-xr-x
7. To create a new
The document discusses various topics related to Unix system administration including device files, block and character devices, major and minor numbers, the Unix file system structure, partitions, file systems, inodes, mounting and unmounting file systems, disk space usage commands, compression tools, printing files, file system checking, user management commands, the role of init in startup and shutdown, run levels, and backup tools. Some key points include:
1. Device files allow all physical devices like tapes, printers, disks to be accessed as normal files.
2. Block and character devices are distinguished based on whether access is via blocks (block devices) or directly (character devices).
3. Major and minor numbers help the
Unix is a multi-user computer operating system capable of handling activities from multiple users simultaneously. It was originally developed in 1969 at Bell Labs by Ken Thompson and Dennis Ritchie. The Unix operating system acts as an interface between the user and computer, allowing users to run multiple programs simultaneously. It became a leading operating system for commercial enterprises during the 1980s and 1990s.
The document provides an overview of the Linux filesystem, including its hierarchical tree structure with common subdirectories like /bin, /home, and /usr. It discusses useful commands for navigating the filesystem like cd, pwd, and running privileged commands with sudo. The document also compares the Linux and Windows filesystem structures and file types. It introduces package management with apt-get and the power of pipes in Linux.
The document discusses various UNIX file APIs. It describes different file types in UNIX like regular files, directories, FIFO files, device files, and symbolic links. It then explains the open(), read(), write(), close() system calls used to perform operations on files. open() is used to open or create a file. read() reads data from an open file. write() writes data to a file. close() closes an open file. Examples of using these calls are also provided.
Linux is an operating system with several key components:
- A kernel that manages system resources and processes. Processes allow programs to run in memory simultaneously.
- Files and directories that organize data. Directories contain files and other directories.
- Tools like tar for backing up files and mounting disks. The mount command attaches filesystems.
- A shell interface for entering commands to interact with the system, along with utilities like ls, cp, and man.
- Permissions and variables that control access and store values for commands.
The document discusses various types of files in UNIX/Linux systems such as regular files, directory files, device files, FIFO files, and symbolic links. It describes how each file type is created and used. It also covers UNIX file attributes, inodes, and how the kernel manages file access through system calls like open, read, write, and close.
This document provides an overview of Linux system fundamentals including how to install Ubuntu in a virtual machine, basic commands like ls, cat, and sudo, understanding users, home directories and man pages. It explains key Linux concepts such as the kernel, command line interface, and root user and how to switch directories, view files and get help using man pages.
The document provides an overview of the UNIX operating system. It discusses the components of a computer system including hardware, operating system, utilities, and application programs. It then defines the operating system as a program that acts as an interface between the user and computer hardware. The document outlines the goals of an operating system and provides a brief history of the development of UNIX from Multics. It also describes some key concepts of UNIX including the kernel, shell, files, directories, and multi-user capabilities.
Unix operating system architecture with file structure amol_chavan
The document provides information about the Unix operating system, including:
- Unix was originally developed in 1969 at Bell Labs and consists of programs that link the computer and user. There are various commercial and open-source variants available.
- It allows for multi-user access where many users can use the system at once, and multitasking where users can run multiple programs simultaneously.
- The kernel manages hardware interaction, memory, processes, I/O, and enforces access permissions. The shell interprets commands for the kernel to execute programs and utilities like cp, mv, cat, and grep.
- All data is organized into files within a hierarchical directory structure called the file system, with directories like
The document provides an overview of basic computer operating systems concepts. It discusses file management, file systems, directories, paths, file operations, and roles in file management. It also summarizes concepts related to security management, failure management, supervisors, and where to find more information on operating systems.
Open System Interconnection model and its layers.pdfpoongothai11
The OSI (Open Systems Interconnection) model is a framework that standardizes network communications into seven distinct layers—physical, data link, network, transport, session, presentation, and application—each with specific functions and responsibilities. This structured approach facilitates interoperability among different devices and aids in troubleshooting network issues. Understanding these layers is essential for effective network management and data transfer.
Computer Organization Introduction, Generations of Computer.pptxpoongothai11
The document provides a comprehensive overview of computer organization, including the definition, components, and generations of computers, highlighting their evolution from large vacuum tube models to modern personal computers. It categorizes computers based on size and function, detailing various types such as supercomputers, mainframes, and microcomputers, alongside their characteristics and applications. Additionally, it discusses the basic structure of hardware and software, input/output devices, and the core functions of computers, while also addressing their advantages and disadvantages in modern society.
C Programming Language Introduction and C Tokens.pdfpoongothai11
The document provides an overview of the C programming language, including its history, structure, and importance. It elaborates on the various sections of a C program, data types, operators, variables, and input/output functions, along with examples. C is highlighted as a robust general-purpose language essential for system-level programming and structured programming practices.
Stack and its operations, Queue and its operationspoongothai11
This document covers stack and queue data structures, detailing their characteristics, operations, and implementations. A stack follows a Last In First Out (LIFO) principle while a queue operates on a First In First Out (FIFO) basis, with specific operations described for each. It includes various use cases and examples of executing and evaluating arithmetic expressions using stacks.
Searching and Sorting Algorithms in Data Structurespoongothai11
The document covers various searching and sorting algorithms, explaining their methods, advantages, and disadvantages. It details linear and binary search algorithms, along with time complexities and sample code implementations, emphasizing when to use each method. Additionally, the document describes sorting algorithms like bubble sort, selection sort, and merge sort, highlighting their operational processes and efficiencies.
Thread Concept: Multithreading, Creating thread using threadpoongothai11
The document discusses the thread concept in Java, highlighting its definition, benefits, and the process of creating threads. It explains the lifecycle of threads, including various states such as new, running, suspended, blocked, and terminated, along with methods to create threads by extending the Thread class or implementing the Runnable interface. Additionally, code examples illustrate how to manage thread priorities and names during execution.
Exception Handling Multithreading: Fundamental of Exception; Exception types;...poongothai11
The document covers Java exception handling and multithreading, explaining what exceptions are, the importance of handling them, and the hierarchy of Java exception classes. It details the types of exceptions, exception keywords, and how to use try-catch blocks effectively, including scenarios and examples of common exceptions like ArithmeticException and NullPointerException. Additionally, the document discusses the throw keyword, user-defined exceptions, and the use of finally blocks to execute essential code regardless of exceptions.
Introduction to Data Structures, Data Structures using C.pptxpoongothai11
The document provides an overview of data structures in C programming, detailing their definition, importance, and various categories such as primitive and non-primitive structures. It discusses key features like robustness, adaptability, and reusability, along with memory allocation methods (malloc, calloc, free, realloc) and the differences between static and dynamic memory allocation. Additionally, it introduces recursive functions and examples including calculating the greatest common divisor and the Tower of Hanoi puzzle.
Introductory Material for Markov-chain Description of Abzymes CatalysisOrchidea Maria Lecian
speaker: Orchidea Maria Lecian
Authors: Orchidea Maria Lecian, seergey Suchkov
Title: Introductory Material for
Markov-chain Description of Abzymes Catalysis
Talk presented at the International Symposium on
Public Health and Epidemiology and
Immunology Research
12-13 June 2025, Rome, Italy on 13 June 2025.
Cloud Collaboration Market Challenges, Drivers, Trends, and Forecast by 2031moresonali406
The report is segmented by Component (Solution, Service); Deployment (Private Cloud, Public Cloud, Hybrid Cloud); Organization Size (Large Enterprises, Small and Medium Enterprises (SMEs)); Vertical (BFSI, Consumer Goods And Retail, Education, Government and Public Sector, Healthcare and Life Sciences, Manufacturing, Media and Entertainment, Telecommunication and ITES, Others). The global analysis is further broken-down at regional level and major countries. The report offers the value in USD for the above analysis and segments
Introduction to Microbiology and Microscopevaishrawan1
This presentation describe about the types of microscope, history and development of microscope and microbiology. Especially focus on Structure & Morphology of Bacteria
1. Unix / Linux Operating System
Department of Computer Science (UG)
Operating System and Linux
(21BCA2T343)
Dr.Poongothai P
Assistant Professor
Department of Computer Science (UG)
Kristu Jayanti College (Autonomous)
Bengaluru.
2. The Unix operating system is a set of programs that act
as a link between the computer and the user.
The computer programs that allocate the system
resources and coordinate all the details of the
computer's internals is called the operating system or
the kernel.
Users communicate with the kernel through a program
known as the shell.
The shell is a command line interpreter; it translates
commands entered by the user and converts them into a
language that is understood by the kernel.
3. UNIX is a powerful Operating System initially
developed by Ken Thompson, Dennis Ritchie at AT&T
Bell laboratories in 1970.
In UNIX, the file system is a hierarchical structure of
files and directories where users can store and retrieve
information using the files.
Several people can use a Unix computer at the same
time; hence Unix is called a multiuser system.
Unix Operating system
6. Kernel − The kernel is the heart of the operating system. It
interacts with the hardware and most of the tasks like memory
management, task scheduling and file management.
Shell − The shell is the utility that processes your requests.
When you type in a command at your terminal, the shell
interprets the command and calls the program that you want.
Commands and Utilities − There are various commands and
utilities which you can make use of in your day to day
activities. cp, mv, etc. are few examples of commands and
utilities
Files and Directories − All the data of Unix is organized into
files. All files are then organized into directories. These
directories are further organized into a tree-like structure
called the filesystem.
7. When a computer starts running or reboots to get an
instance, it needs an initial program to run. This initial
program is known as the bootstrap program, and it
must initialize all aspects of the system, such as:
First, initializes the CPU registers, device controllers,
main memory, and then starts the operating system.
The bootstrap program finds the operating system
kernel on disk to do its job and then loads that kernel
into memory.
And last jumps to the initial address to begin the
operating-system execution.
Boot Block
8. The superblock is essentially file system metadata and
defines the file system type, size, status, and
information about other metadata structures (metadata
of metadata).
Superblocks also stores configuration of the file
system.
Some higher level details that is stored in superblock is
mentioned below.
Blocks in the file system, No of free blocks in the file
system, Inodes per block group, Blocks per block
group, Mount time, Write time and File System State
Super block
9. An inode is a data structure in UNIX operating
systems that contains important information
pertaining to files within a file system.
When a file system is created in UNIX, a set
amount of inodes is created, as well.
Whenever a user or a program needs access to a
file, the operating system first searches for the exact
and unique inode (inode number), in a table called
as an inode table.
In fact the program or the user who needs access to
a file, reaches the file with the help of the inode
number found from the inode table.
Inode table
10. An inode can directly or indirectly reference
three kinds of data blocks.
All referenced blocks must be of the same
kind.
The three types of data blocks are:
Plain data blocks
Symbolic-link data blocks
Directory data blocks
Data block
11. Plain data blocks contain the information stored in a
file.
Symbolic-link data blocks contain the path name
stored in a symbolic link.
Directory data blocks contain directory
entries. fsck can check the validity only of directory
data blocks.
(The fsck command checks the general connectivity
of the file system)
12. All Unix disk files are stored in one directory
tree.
This includes both system files and user files.
The files are grouped in directories, which are
simply collections of files and/or more
directories.
Storing and accessing file
13. File ownership is an important component of Unix that
provides a secure method for storing files. Every file in
Unix has the following attributes −
Owner permissions − The owner's permissions
determine what actions the owner of the file can
perform on the file.
Group permissions − The group's permissions
determine what actions a user, who is a member of the
group that a file belongs to, can perform on the file.
Other (world) permissions − The permissions for
others indicate what action all other users can perform
on the file.
14. The permissions of a file are the first line of defense
in the security of a Unix system.
The basic building blocks of Unix permissions are
the read, write, and execute permissions, which have
been described below −
Read: Grants the capability to read, i.e., view the
contents of the file.
Write: Grants the capability to modify, or remove the
content of the file.
Execute: User with execute permissions can run a file
as a program.
File Access Modes
15. Directory access modes are listed and organized in the
same manner as any other file.
There are a few differences that need to be mentioned
Read: Access to a directory means that the user can read
the contents. The user can look at the filenames inside
the directory.
Write: Access means that the user can add or delete files
from the directory.
Execute: Executing a directory doesn't really make sense,
so think of this as a traverse permission (passthrough).
Directory Access Modes
16. pwd Command
The pwd command is used to display the location of
the current working directory.
Syntax:
pwd
Output:
Directory commands
17. mkdir Command
The mkdir command is used to create a new directory
under any directory.
Syntax: mkdir <directory name>
Output:
18. rmdir Command
The rmdir command is used to delete a directory.
Syntax: rmdir <directory name>
Output:
19. ls Command
The ls command is used to display a list of content of a
directory.
Syntax:
ls
Output:
20. cd Command
The cd command is used to change the current
directory.
Syntax:
cd <directory name>
Output:
21. S.No Command & Description
1 cat filename - Displays a filename
2 cd dirname - Moves you to the identified directory
3 cp file1 file2 - Copies one file/directory to the specified location
4 file filename - Identifies the file type (binary, text, etc)
5 find filename dir - Finds a file/directory
6 head filename - Shows the beginning of a file
7 less filename - Browses through a file from the end or the beginning
8 ls dirname -Shows the contents of the directory specified
9 mkdir dirname - Creates the specified directory
File commands
22. 10 more filename
Browses through a file from the beginning to the end
11 mv file1 file2
Moves the location of, or renames a file/directory
12 pwd
Shows the current directory the user is in
13 rm filename
Removes a file
23. The ‘pipe’ command is used in both UNIX and Linux
operating systems.
Pipes help combine two or more commands and are
used as input/output concepts in a command.
In the Linux operating system, we use more than one
pipe in command so that the output of one command
before a pipe acts as input for the other command after
the pipe.
Syntax
Command 1 | command 2 | command 3 | ……
Pipe and pipeline
24. Suppose we have a file named file1.txt having
the names of the students.
We have used the cat command to fetch the
record of that file.
$ Cat file1.txt
25. The data present in this file is unordered.
So, to sort the data, we need to follow a piece
of code here.
$ Cat file1.txt | sort
26. Now we will use the command to remove all
the words that are duplicated in the file.
$ Cat file2.txt | sort | uniq
27. we will use the below-cited command to save
them.
$ cat file2.txt | sort | uniq > list4.txt
The output will be saved in another file with the
same extension.
in this example, we have declared the range up
to 4.
So the data will be from the first 4 lines of the
file.
Consider the same file file2.txt as we have
taken an example above.
$ Cat file2.txt | head -4
28. Process control commands are the system calls
for creating, managing, and coordinating
processes.
Process control commands in Unix are:
bg - put suspended process into background
fg - bring process into foreground
jobs - list processes
Process control
29. The fork() function is used to create a new process by
duplicating the existing process from which it is
called.
The existing process from which this function is
called becomes the parent process and the newly
created process becomes the child process.
FORK
30. exit-Issuing the exit command at the shell prompt
will cause the shell to exit.
EXAMPLE-1:
To exit from shell:
$ exit
output:
# su ubuntu
EXIT
31. In order to wait for a child process to
terminate, a parent process will just execute
a wait() system call.
Wait for a child process to end
The wait() system call suspends execution of
the current process until one of its children
terminates.
WAIT
32. The exec() system call is used to make the
processes.
When the exec() function is used, the currently
running process is terminated and replaced
with the newly formed process.
In other words, only the new process persists
after calling exec(). The parent process is shut
down.
Exec
33. The functions which change the execution mode of
the program from user mode to kernel mode are
known as system calls.
System calls in Unix are used for file system
control, process control, interprocess
communication etc.
Access to the Unix kernel is only available through
these system calls.
Unix system calls
34. System Call Description
access() This checks if a calling process has access to
the required file
chdir() The chdir command changes the current
directory of the system
chmod() The mode of a file can be changed using this
command
chown() This changes the ownership of a particular
file
kill() This system call sends kill signal to one or
more processes
link() A new file name is linked to an existing file
using link system call.
open() This opens a file for the reading or writing
process
pause() The pause call suspends a file until a
particular signal occurs.
35. stime() This system call sets the correct time.
times() Gets the parent and child process
times
alarm() The alarm system call sets the alarm
clock of a process
fork() A new process is created using this
command
chroot() This changes the root directory of a
file.
exit() The exit system call is used to exit a
process.
36. Library functions typically provide a richer set of
features.
For example, the fread() library function reads a
number of elements of data of specified size from a
file.
While presenting this formatted data to the user,
internally it will call the read() system call to actually
read data from the file.
Library Functions