Linux Lab Questions
Linux Lab Questions
Instructions:
2. Do every question in your directory only otherwise file will not be evaluated
3. Write Linux Lab in Header and Page Number, Name class and Roll No in Footer as
done in this list
Questions
Que 1 Write the linux command to display calendar with various options
Que 3 Write a linux command to display the list of users who are currently using
linux server.
Que 6 Write linux command to list all the directories and files on the server.
Que 8 Write the linux command to print the content on standard output device.
Que 10 Write the linux command to show the current working directory.
Que 10 Write the linux command to get help with various options.
Que 12 Write the linux command to display what all users are currently doing
1
NAME
COURSE
Roll No
Linux Lab
Que 17 Write the linux Command to copy a file to some other location
Que 18 Write the linux command to move a file to some different location.
Que 19 Write the linux command to compare the contents of two files
Que 20 Write the linux command to show the difference between the contents of
two files
Que 21 Write the linux command to show the common data of two files.
Que 22 Write the linux command to count the number of words, lines and sentences
in the file
Que 23 Write the linux command to see the data in octal format.
Que 26 Write the linux command to unalias the exiting alias name.
Que 27 Write the linux command to display the hostname of the system.
Que 28 Write the linux command to get information about the operating System.
Que 33 Write the linux command to extract specific column and field from a file.
Que 36 Write the linux command to find any character and replace it with some
other character.
Que 37 Write the linux command to check the default permission of a file
Que 38 Write the linux command to change the default permission of a file
2
NAME
COURSE
Roll No
Linux Lab
Que 39 Write the linux command to change the permission of an existing file in
relative manner
Que 40 Write the linux command to change the permission of an existing file in
absolute manner
Que 42 Write the linux command to create a soft link of a file as well as directory
Que 43 Write the linux command to search for specific pattern in a file.
Que 44 Write the linux command to show the use of Basic Regular Expressions using
grep Command.
Que 45 Write the linux command to show the use of Extended Regular Expressions
using grep Command.
Que 46 Write the linux command to print the result of a specific pattern.
Que 47 Write the linux command to copy specified pattern of one file in another file
using sed Command.
Que 48 Write the linux command to copy the data except specified pattern of one file
in another file using sed Command
Que 49 Write the linux command to replace any character/string with specified
character/string using sed Command
Que 50 Write the linux command to show the use of Basic Regular Expressions using
sed Command.
Que 51 Write the linux command to show the use of awk Command
Que 52 Write the linux command to list the processes for the current shell(ps).
Que 53 Write the linux command to display detailed information about processes.
Que 54 Write the linux command to stop any currently running process
Que 55 Write the linux command to run the process in the background
Que 58 Write the linux command to create a Zip file and Unzip it
Que 59 Write the linux command to create a GZip file and Unzip it
3
NAME
COURSE
Roll No
Linux Lab
Que 61 Write a shell script to print all the users who have currently logged in
Que 62 Write a shell script to display only the size of files from the current working
directory
Que 63 Write a shell script to create a directory and files and subdirectories
Que 67 Write a shell script to extract certain values from Environment variable PATH
Que 69 Write a shell script to greet the user according to the week of the day.
Que 70 Write a shell script to display the number of vowels and consonants in a
string
Que 72 Write a shell script to count words, lines and characters in a file
Que 73 Write a shell script to find out which shell you are working in.
Que 74 Write a shell script to show the output of who command sorted on 3rd
column
Que 76 Write a shell script to check whether the year entered is leap or not.
Que 81 Write a shell script to check whether a number entered is prime or not.
Que 82 Write a shell script to accept a filename as command line argument and print
its contents
4
NAME
COURSE
Roll No
Linux Lab
Que 85 Write a shell script to copy the contents of one file to another file in a
separate directory.
Que 86 Write the linux command to display a list of CPU-intensive tasks on the
system.
Que 88 Write the linux command to displays the processes on the system in the form
of a tree.
5
NAME
COURSE
Roll No