-
Notifications
You must be signed in to change notification settings - Fork 1
/
Lab - lec1.txt
38 lines (27 loc) · 1.21 KB
/
Lab - lec1.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
1. Install Ubunto OS using virtal machine.
done
2. What is the difference between cat and more command?
cat displays all the file content where more does pagination that can be controlled using space (forward), b (backward) and q (quit)
3. What is the difference between rm and rmdir using man?
"rm" removes files and directories where "rmdir" removes empty directories
4. Copy the /etc/passwd file to your home directory making its name is mypasswd.
cp /etc/passwd ~/mypasswd
5. Rename this new file to be oldpasswd.
mv mypasswd oldpasswd
6. You are in /usr/bin, list four ways to go to your home directory
cd ~/
cd /home/marwantukhta
cd ../../home/marwantukhta
cd ..; cd ..; cd home; cd marwantukhta
7. List Linux commands in /usr/bin that start with letter w
ls /usr/bin | grep ^w
8. Display the first 4 lines of /etc/passwd
head -4 /etc/passwd
9. Display the last 7 lines of /etc/passwd
tail -7 /etc/passwd
10. Display the man pages of passwd the command and the file sequentially in one command.
man passwd; man /etc/passwd
11. Display the man page of the passwd file.
man /etc/passwd
12. Display a list of all the commands that contain the keyword passwd in their man page.
man -k man