0% found this document useful (0 votes)
32 views

Assignment 1

This document contains instructions for basic Linux commands. It provides 33 questions as assignments for commands like checking the current user, directory, file permissions, copying, moving, editing and deleting files.

Uploaded by

ankur06e016
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views

Assignment 1

This document contains instructions for basic Linux commands. It provides 33 questions as assignments for commands like checking the current user, directory, file permissions, copying, moving, editing and deleting files.

Uploaded by

ankur06e016
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Assignment [ Basic commands ]

[ NOTE: all questions are inter-related. Do in sequence ! ]


1. Use a command to check which user you are logged in with.

ANS-1
2. Check which directory you are in.

ANS-

3. Create a directory by the name of Grras in /root.


4. Create files named mumbai mathura jaipur kerela and kashmir inside the
Grras directory you have created.

5. Check permissions given to directory Grras.


6. List content of directory Grras without getting inside it.

7. Create a file by the name of rajasthan in /home.

8. Open the file rajasthan and write name of any 5 districts of rajasthan in
it.
9. See content of rajasthan without opening the file.

10.See the last 10 entries of /etc/passwd without opening it.


11.See the first 6 entries of /etc/group without opening it. WORKING ON
IT`````````````````````````````````````````````````````````````
12.List the number of lines, words, and characters in /home/rajasthan.
WORKING ON IT.
13.Copy data of /etc/group into /home/practice/users.txt.

14.List the content of /home/rajasthan but the output should not be visible
on screen. It should be saved in /usr/district.txt .
15.Come to /home and give command “mkdir rajasthan” . the error should
be saved in /home/error.txt .
16.run “cla” command and the error, if any should transfer to
/home/error.txt file. make sure it won’t override the error already
written in it.
17.Check the permission of /root/Grras/Kashmir.

18.Come to /root and create directory “table” in /home without changing


your working directory ( /root ).
19.Create directories in /usr/glass/water/salt in one command without
changing your present working directory. (use an option )

20.Create a file named sugar.txt in /usr/glass/water/salt without changing


the present working directory ( /root ).
21.Create four directories named up north west and south in /home.
22.Write “The way you think for others is the way you treat them, and the
way you treat them, they will treat you the same way” in
/root/Grras/kerela without getting inside it

23.Write “ the way to success goes through the path of your mindset” in
/root/Grras/mumbai with the help of vim editor tool.
24.Edit “so always think good ! If you want to be treated good” in
/root/Grras/kerela without opening it. Make sure that the lines you
have already written in it should not get vanished. WORKING ON IT.
25.Change the name of “kerela” to “Karnataka”.

26.copy “mumbai” to /home/west.


27.Copy /usr/glass to /home.”
28.Move Karnataka to /home/south but it should be saved by the name of
kerela.txt again.
29.Grep line having “good” word in it from /root/Grras/kerela.txt.
30.List directory-wise content of /home.
31.Create a hard link /home/west/mumbai in /home/south by the name of
“mumbai.link”.
32.Remove “Jaipur” from /root/Grras.
33.Remove “up” from /home.

You might also like