Vous êtes sur la page 1sur 2

Assignment Linux

1. Write the commands with sort description ,syntax ,options and


example for
(A)
File related Command
(B)
Directory related command
(C)
Disk Related command
(D)
Process related command
2. WASP for finding the largest number among 3 numbers.
3. Compare two strings for equal or not equal using Shell program.
4. WAS program for Checking the file status(file ,directory , character
file ,blocked file ,read status , write status, execute status and sticky
bit )
5. WASP for arithmetic operation using case statement.
6. WASP for printing Table of 2 using while loop, until loop and for loop.
7. WASP for finding the no. of character, word and line in a given file.
8. Write the command for restore and backup. -s file
file is exist and has size greater than 0
9. -f file
10.

True if the

True if the file is exist and is not a directory.


-d file

True if the file is exist and is a directory.

11.
-c file
special file.

True if the file is exist and is a character

12.
file.

True if the file is exist and is a block special

-b file

13.
-r file
permission.

True if the file is exist and have read

14.
-w file
permission.

True if the file is exist and have write

15.
-x file
permission.

True if the file is exist and have execute

16.

True if the file is exist and its sticky bit is set.

-k file

Echo Enter the file name


Read filenamez
If [ -f $filename ]
then
echo this is a file
else
echo This is not a file name
fi

17.

Note: - Assignment should be submitted on 23/05/2011 on handwritten file


karhe

Vous aimerez peut-être aussi