0% found this document useful (0 votes)
91 views3 pages

Linux PracticalSub Code

OS PRAC

Uploaded by

Shanthi Ramesh
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
91 views3 pages

Linux PracticalSub Code

OS PRAC

Uploaded by

Shanthi Ramesh
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

SUBJECT NAME: LINUX PRACTICAL 25235 YEAR/SEM: II/III PART A LINUX COMMANDS 1.

SUB CODE:

Write down the syntax and usage of the following exercise with all options. Check the commands with the system (a) Logon to UNIX and logoff. (b) Usage of directory management commands: ls, cd,pwd, mkdir,rmdir (c) Usage of File Management commands: cat, chmod,cp,mv,rm, more, file commands

2. 3. 4. 5.

Use the general purpose commnds: wc, od, lp, cal , date, who , tty ,ln Using the simple filters: pr, head, tail, cut, paste, nl, sort Advanced filters : Search for a pattern using grep, egrep & fgrep To know the details of process status- ps command , Process management commands: &, nohup, kill, nice Communication Commands: news, write, mail, wall, calendar Device pattern using meta character to match each of the following situation:i)

6. 7.

All two character filenames.

ii) All filenames consisting of two lowercase letters.

iii) All filenames ending with c. iv) All filenames beginning with a c and ending with a digit. v) All filenames beginning with p and having at somewhere. PART B SHELL SCRIPTS 1. Write a shell-script that accepts a numerical value N. Then display the decrementing value of N till it reaches 0. 2. Write a shell-script that takes three command line arguments. The first argument is the name of the destination file and the other two arguments are names of files to be placed in the destination file. 3. Write a Shell script to print contents of file from given line number to next given number of lines 4. a)Shell script to say Good morning/Afternoon/Evening as you log in to system b)Write a shell- script that print out date information in this order: time, day of the week, day number, year that is like this. 13:55:00 IST Sun 9 Jun 1996

5. 6. 7.

Write a shell-script that tells you its name and PID Develop a Basic math Calculator using case statement Write a shell-script that takes a login name as a command line argument and reports to you when that person logs in. Have it sent a greeting to that person. Write a shell-script that takes a command line argument and reports on whether it is a directory, a file or something else.

8.

SUBJECT NAME: LINUX PRACTICAL 25235 YEAR/SEM: II/III PART A LINUX COMMANDS 1.

SUB CODE: DATE:

Write down the syntax and usage of the following exercise with all options. Check the commands with the system (a) Logon to UNIX and logoff. (b) Usage of directory management commands: ls, cd,pwd, mkdir,rmdir (c) Usage of File Management commands: cat, chmod,cp,mv,rm, more, file commands

2. 3. 4. 5.

Use the general purpose commnds: wc, od, lp, cal , date, who , tty ,ln Using the simple filters: pr, head, tail, cut, paste, nl, sort Advanced filters : Search for a pattern using grep, egrep & fgrep To know the details of process status- ps command , Process management commands: &, nohup, kill, nice Communication Commands: news, write, mail, wall, calendar Device pattern using meta character to match each of the following situation:iii) All two character filenames. iv) All filenames consisting of two lowercase letters.

6. 7.

iii) All filenames ending with c. iv) All filenames beginning with a c and ending with a digit. v) All filenames beginning with p and having at somewhere. PART B SHELL SCRIPTS 1. Write a shell-script that accepts a numerical value N. Then display the decrementing value of N till it reaches 0.

2.

Write a shell-script that takes three command line arguments. The first argument is the name of the destination file and the other two arguments are names of files to be placed in the destination file.

3.

Write a Shell script to print contents of file from given line number to next given number of lines a)Shell script to say Good morning/Afternoon/Evening as you log in to system b)Write a shellscript that print out date information in this order: time, day of the week, day number, year that is like this. 13:55:00 IST Sun 9 Jun 1996

4.

5. 6. 7.

Write a shell-script that tells you its name and PID Develop a Basic math Calculator using case statement Write a shell-script that takes a login name as a command line argument and reports to you when that person logs in. Have it sent a greeting to that person. Write a shell-script that takes a command line argument and reports on whether it is a directory, a file or something else.

8.

INTERNAL EXAMINER EXAMINER

EXTERNAL

You might also like