Linux programming pdf
click here to download the above pdf book
UNIT I
Linux Utilities-File handling utilities, Security by file permissions, Process utilities, Disk utilities, Networking commands, Filters, Text processing utilities and Backup utilities.
Sed-Scripts,Operation,Addresses,Commands,Applications, awk-Execution,Fields and Records,
Scripts,Operation,Patterns,Actions,Associative Arrays,String and Mathematical functions,System commands in awk,Applications..
Shell programming with Bourne again shell(bash)- Introduction, shell responsibilities, pipes and Redirection, here documents, running a shell script, the shell as a programming language, shell meta characters, file name substitution, shell variables, command substitution, shell commands, the environment, quoting, test command, control structures, arithmetic in shell, shell script examples, interrupt processing, functions, debugging shell scripts.
Review of C programming concepts-arrays, strings (library functions),pointers,function pointers,structures,unions,libraries in C.
UNIT II
Files and Directories- File Concept, File types, File System Structure,file metadata-Inodes, kernel support for files, system calls for file I/O operations- open, creat, read, write, close, lseek, dup2,file status information-stat family, file and record locking-lockf and fcntl functions,file permissions - chmod, fchmod,file ownership-chown,lchown,fchown, links-soft links and hard links – symlink, link, unlink.
Directories-Creating,removing and changing Directories-mkdir, rmdir, chdir, obtaining current working directory-getcwd, Directory contents,Scanning Directories-opendir, readdir, closedir,rewinddir, seekdir, telldir functions.
UNIT III
Process – Process concept, Layout of a C program image in main memory,Process environment-environment list,environment variables,getenv,setenv,Kernel support for process, process identification, process hierarchy,process states, process control - process creation, replacing a process image,waiting for a process, process termination, zombie process,orphan
process, system call interface for process management-fork, vfork, exit, wait, waitpid, exec family, system,I/O redirection,Process Groups,Sessions and Controlling Terminal,Differences between threads and processes.
Signals – Introduction to signals, Signal generation and handling, Kernel support for signals, Signal function, unreliable signals, reliable signals, kill, raise , alarm, pause, abort, sleep functions.
UNIT IV
Interprocess Communication - Introduction to IPC, IPC between processes on a single computer system, IPC between processes on different systems,pipes-creation,IPC between related processes using unnamed pipes, FIFOs-creation,IPC between unrelated processes using FIFOs(Named pipes), differences between unnamed and named pipes,popen and pclose library functions.
Message Queues- Kernel support for messages, APIs for message queues, client/server example.
Semaphores-Kernel support for semaphores, APIs for semaphores, file locking with semaphores.
UNIT V
Shared Memory- Kernel support for shared memory, APIs for shared memory, shared memory example.
Sockets- Introduction to Berkeley Sockets, IPC over a network,Client-Server model,Socket address structures (Unix domain and Internet domain),Socket system calls for connection oriented protocol and connectionless protocol, example-client/server programs-Single Server-Client connection,Multiple simultaneous clients, Comparison of IPC mechanisms.
TEXT BOOKS:
1. Unix System Programming using C++, T.Chan, PHI.
2. Unix Concepts and Applications, 4th Edition, Sumitabha Das, TMH,2006.
3. Beginning Linux Programming, 4th Edition, N.Matthew, R.Stones,Wrox, Wiley India Edition,rp-2008.
4. Unix Network Programming ,W.R.Stevens,PHI.
5. Unix and Shell programming, B.A.Forouzan and R.F.Gilberg, Cengage Learning.