Sie sind auf Seite 1von 5

1.

PROGRAM NO : DATE :
AIM:
2.
3. Explain the installation procedure of Linux(standalone).

4. Basic commands:a) cd b) mkdir c) pwd


j) touch k) cat

d) cal

e) ls f) mv g)cp h) rm i) rmdir

l) file m) ln n) find

3. File comparison commands:a) cmp

b)diff

4. Disk related commands:a) du

b)df

c)dfspace

d) ulimit e) checking disk quota(quotacheck,edquota)

5. Scheduling commands:a) at

b) batch

c) crontab

6. Process related commands:a) ps

b) kill c) nice d) bg e) who f) nohup g) fork h) killall i) trap j) exit

k) renice l) trace m) top n) exec


7.

Printing commands:a) lpr b) lpq c) lprm d) lpc e) pr

8.

File Processing commands:a) wc b) sort c) cut d) paste

9.

e) dd

f) join

g) uniq h) read

Mathematical commands:a) expr b) eval

c) bc d) factor

e) let f) test

10. Filter commands:a) pr

b) head

c) tail

d) tr

e) pg f) more g) less

11. Filter using regular expression:a) grep b) egrep

c) fgrep

d) sed

e) awk

12. Communication commands:a) mesg

b) talk

c) write

g) who

h) whoami

d) wall

e) finger f) ping

i)hostname j) uname

k) umask

l) chfn

13. Bash start up files:a) /etc/profile file

b) .bashrc c) .bash_profile d) .bash_logout e) .bash_history

14. Environment variables and positional parameters:- a) env b) set c ) unset


d) shift e) export
15. File system management:a) mount

b) fsck c) mkfs d) umount e) /etc/fstab file

16. Archiving and compression utilities:a) compress


e) cpio

b) uncompress c) gzip(with options) d) gunzip(with options)

f) dump

g) restore h) rsync i) tar j) zcat k) bzip2 l) zip

17. File permissions:a) chmod

b) chown c) chgrp

18. User Administration:a) useradd

b) usermod

g)/etc/passwd file

c) userdel

d) groupadd e) groupmod f) groupdel

h) /etc/shadow

19. Linux start up and shut down:a) init b) /etc/inittab file


c) chkconfig d) xinetd service
e) reboot f) shut
down g) poweroff h) halt i) startx
j) lilo k) grub l) telinit
20. Vi editor commands:a) Basic commands
b) Insert and replace commands
c) Deletion and modification commands
21. Software package management:a) rpm b) dpkg c) yum

d) apt-get

22. LAN card configuration procedure


-ifconfig command
23. Server configuration procedure-DHCP,DNS,FTP,Telnet,SSH,NFS

Shell Scripts
1. Write a shell script to accept a string and display the same.
2. Write a shell script to check whether an inputted number is odd or even and
display the corresponding message.
3. Write a shell script to find the factorial of a number.

4.
5.
6.
7.

Write a shell script to print the sum of digits of a given number.


Write a shell script to check whether a given year is leap year or not.
Write a shell script to check whether a given string is palindrome or not.
Write a shell script to print the contents of a file from a given line number to next given
line number.
8. Write shell script using for loop to print the following patterns on screen
a)
*
* *
* * *
* * * *
9. Write a shell script to print nos as 5,4,3,2,1 using while loop.
10.

Write a shell script, using case statement to perform basic math operation .

11. Write a shell script to print given number in reverse order.


12. Construct pipes to carry out the following jobs:a) List all files beginning with the character P on the screen and also store them in a file
called file1.
b) List all files beginning with the character P on the screen twice in succession.
c) Output of who should be sorted and displayed on the screen along with the total no of
users. The same output except the no of users should also be sorted in a file file1.
d) Merge the contents of the files a.txt, b.txt, c.txt, sort them and disply the sorted output
on the screen page by page.
e) Display the list of last 20 files in current directory. Also store this list in a file profile.
13. Write a shell script to calculate the gross salary of an employee.If basic salary is >

=3000,
DA=11% of BS, HRA=4% of BS and if basic salary <3000, DA=4% of
BS, HRA=10% of BS.Display employee name, basic salary, DA, HRA and Gross salary.
14. Write a program to print all prime numbers from 1 to 300.
(Hint : Use nested loops , break and continue)
15. Write a program to generate all combinations of 1, 2 and 3 using for loops.
16. A file called wordfile consists of several words. Write a shell script which will receive a
list of filenames, the first of which would be wordfile. The shell script should report all
occurrences of each word in wordfile in the rest of the files supplied as arguments.

17.Write a shell script which deletes all lines containing the word unix in the files supplied
as arguments to this shell script.
18. The word unix is present in only some of the files supplied as arguments to the shell
script.Your shell script should search each of these files in turn and stop at the first file that
it encounters containing the word unix . this filename should be displayed on the screen.
19. A shell script receives even numbers of filenames. Suppose four filenames are supplied
then the first file should get copied into second file, the third file should get copied into
fourth file, and so on. If odd number of filenames are supplied then no copying should take
place and an error message should be displayed.
` 20. Write a shell script which displays a list of all files in the current directory to which you
have read, write and execute permissions.
21.Write a shell script which will receive any number of filenames as arguments. The shell
script should check whether every argument supplied is a file or a directory. If it is a directory
it should be appropriately reported. If it is a filename then name of the file as well as the
number of lines present in it should be reported.
22.Write a shell script which will receive any numbers of filenames as arguments. The shell
script should check whether such files already exist. If they do, then it should be reported. If
these files do not exist then check if a sub-directory called mydir exists in the current
directory. If it doesnt exist then it should be created and in it the files supplied as arguments
should get created. If mydir already exists then it should be reported along with the number
of files that are currently present in mydir.

Das könnte Ihnen auch gefallen