0% found this document useful (0 votes)
18 views1 page

Lab1&lab2: Unix Commands

The document outlines a series of labs covering Unix commands, system calls related to files and processes, and shell scripting. Lab 1 and 2 focus on basic Unix commands like pwd, ls, cd, cp, mv, rm, mkdir and process commands like ps. Lab 3 and 4 cover file system calls - programs are described to open, create, read, write and modify files using calls like open(), creat(), read(), write() and lseek(). Lab 5 covers process system calls - programs that demonstrate fork() to create child processes and the use of wait() to synchronize parent and child process execution. Lab 6 covers shell scripting - example programs include using wc to calculate factor

Uploaded by

reddy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views1 page

Lab1&lab2: Unix Commands

The document outlines a series of labs covering Unix commands, system calls related to files and processes, and shell scripting. Lab 1 and 2 focus on basic Unix commands like pwd, ls, cd, cp, mv, rm, mkdir and process commands like ps. Lab 3 and 4 cover file system calls - programs are described to open, create, read, write and modify files using calls like open(), creat(), read(), write() and lseek(). Lab 5 covers process system calls - programs that demonstrate fork() to create child processes and the use of wait() to synchronize parent and child process execution. Lab 6 covers shell scripting - example programs include using wc to calculate factor

Uploaded by

reddy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Lab1&lab2: Unix commands:

.Practise on some basic unix commands (pwd, ls, cd, cd directory, cd ~, cd -, ls, ls
directory, ls a, file, cp, mv, rm, mkdir, rmdir, su, rmdir, ps, su, echo, sort, free, lpr,
uname a, df, clear, cat, ls /usr/bin/d*etc)

Lab3&Lab4:Systemcalls

File systemCalls:

1. Write a program for open(),Crteat(),Read(),Write()?


2. Move data from File1(Personal Data) and file 2(Educational data) to File3.
Append hobbies to the File3?
3. Demonstrate the lseek() Systemcalls?
4. Write a program to read all txt files (that is files that ends with .txt) in the
currentdirectory and merge them all to one txt file and returns a file descriptor for
thenew file.
5. Write a program that takes a string as an argument and return all the files
thatbegins with that name in the current directory and its sub directories. For
example
> ./a.out foo will return all file names that begins with foo

Lab 5: Process SystemCalls:

1. Creation of Fork() using systemCall?


2. Program Demonstrate interleaved execution of parent and chaild

Program to create multiple child process .parent will wait until all childrens completed use an
appropriate wait() SystemCall

Lab6:ShellScripting:

1. Write a program for factorial operation on the number of words witch is stored in the
given file?(use wc unix command)
2. Loop implementation and arithmetic operation in Shellscripting?
3. Write program for searching operation using grep command?
4. Implement any two commands using shellscripting?

You might also like