Friday, 30 March 2018

computer linux commands


[Enter Post Title Here]



DATE: ____________________ NAME: ______________________________CLASS- SEC: _________ ROLL NO: _________

 
WORKSHEET - CLASS VII -CHAPTER-2- LINUX COMMANDS
1.      Fill in the blanks:
i)                    In Linux, a filename can be maximum of ______ characters long.
ii)                  Linux filename can contain alphabets , digits, _______ and underscores.
iii)                . (Single dot) represents _______________ directory.
iv)                ..(Double dots) represent the ______________ directory.
v)                  ______________________ pathname refers to  file from the root directory.
vi)                Relative pathnames refers to a file from the ____________ directory.
vii)              Filenames starting with a dot are the ___________ files.
viii)            _____________________________ is the keyboard shortcut to open the terminal.
ix)                _____________ is the command to exit from the terminal.
2.      Answer the questions based on the following directory structure.

 





i) What is the absolute pathname for the file sales.c?
__________________________________________________________________________________________
ii) What is the relative pathname for the for the file reports if the current directory is /usr/mano/cfiles?
__________________________________________________________________________________________
iii) What is the absolute pathname for the file mydoc.doc?
__________________________________________________________________________________________
iv) What is the relative pathname for the file mydoc.doc if the current directory is /usr/mano/cfiles?
__________________________________________________________________________________________
3.      State True or False:
i)                    No embedded spaces are allowed in filenames.                                             _______________     
ii)                  Linux treats upper case and lower case letters seperately.                             _______________
iii)                sales-rep is valid filename.                                                                              _______________
iv)                System commands or keywords can be used for a filenames.                        _______________
v)                  @123.png is a invalid filename.                                                                     _______________




 

DATE: ____________________ NAME: ______________________________CLASS- SEC: _________ ROLL NO: _________

 
WORKSHEET - CLASS VII -CHAPTER-2- LINUX COMMANDS  (LAB SESSION)
1.      Execute the following tasks through the terminal after execution, verify the correct execution by observing the output on terminal and observing the "Home Folder" or any other directory as per the task.  
a)                  Command to display all the files & directories in the current directory.        ________________________
b)                  (Check that the list of  files & directories displayed on the terminal are same as in the Home Folder).
c)                  Command to display long listing of files.                                                       ________________________
d)                 Command to display hidden file.                                                                   ________________________
e)                  Command to display the content of the directory & the contents of the  subdirectories present, if any.                                                                                                                              ________________________
f)                   Command to display the file in the columnar format.                                    ________________________
g)                  Command to create a directory named "test".                                                ________________________
(Check in the "Home Folder" that the directory has been created or not).
h)                  Command to create the directory named "test1", "test2" and "test3".           ________________________
(Check in the "Home Folder" that the directory has been created or not).
i)                    Go the home folder and create a file by right clicking and then selecting "create new document-> Empty document". Name it as "a". Open it and type something in the file and save it.
j)                    Command to create a copy of the file created in above step. Name of the copied file will be "acopy" .                                                                                                                  ______________________________
k)                  Command to create another copy of the file "a ". Name of the copied file will be "acopy1".          
                                                                                                            ______________________________
      (Check in the home directory if the two copies of the file "a" has been created or not.)
l)                    Command to move the file "acopy" to the "test" directory.   _________________________________
(Check that if the "acopy" has been moved to the "test" directory or not.)
m)                Command to rename the "a" file to "b". ___________________________________________________
      (Check that if the "a" has been renamed to the "b" or not.)
n)                  Command to delete the file "a.".__________________________________________________________
o)                  Command to delete the file "acopy1" interactively. __________________________________________
(Try "no" first and then "yes" option upon confirmation & also check that the files get deleted )
p)                  Command to delete the directory named "test1". _______________________
q)                  Command to delete the directory named "test2". _______________________
 (Note that directory "test1", "test2" are empty.)
r)                   Command to delete the directory named "test". ________________________
(Note that directory "test" is not empty. It has a file named "acopy").
s)                   Command to change the current directory to  test3. ________________________
(Move any file to test 3 and then check by executing the ls command that directory has been changed.)
Note: After completing your assignment, delete any files or directories created during this session.
A QUICK REVISION OF COMMANDS
1
Command to make a directory.

2
Command to delete an empty directory.

3
Command to delete a non empty directory.

4
Command to change the directory.

5
Command to rename a file.

6
Command to move a file.

7
Command to create a copy of a file.

8
Command to  list the files and directories.

9
Command to display the hidden file.

10
Command to display the file in the columnar format.

 

No comments:

Post a Comment

Sanskrit worksheet

1. sanskrit worksheet 2. Sanskrit worksheet   3. sanskrit worksheet