Lab2 - OSG202
Lab2 - OSG202
1
Tăng Dư Yến - SE171310
OSG202 (Operating Systems)
View the unix directory:
2
Tăng Dư Yến - SE171310
OSG202 (Operating Systems)
Create a file: there are many ways to create a file
- Create the file with name thoca.txt with contents “Cong cha nhu nui thai
son” located at 98 directory:
- Adding the “Nghia me nhu nuoc trng nguon chay ra” sentence into
thoca.txt:
3
Tăng Dư Yến - SE171310
OSG202 (Operating Systems)
View the file content: using any command as cat, more, less,
tail, …
View the thoca.txt file:
4
Tăng Dư Yến - SE171310
OSG202 (Operating Systems)
Move objects: mv
Move the thoca.txt file in the linux library to the openbsd library:
Move the windows directory to penbsd directory:
5
Tăng Dư Yến - SE171310
OSG202 (Operating Systems)
Rename: mv
Rename the windows directory in the openbsd directory to wins:
View the openbsd directory
6
Tăng Dư Yến - SE171310
OSG202 (Operating Systems)
Delete a file: rm
Delete the thoca.txt file in openbsd directory
If wanting to delete without asking before, the option (–f) is used
To delete the directory, the option (-rf) is used
7
Tăng Dư Yến - SE171310
OSG202 (Operating Systems)
8
Tăng Dư Yến - SE171310
OSG202 (Operating Systems)
9
Tăng Dư Yến - SE171310
OSG202 (Operating Systems)
Search the “Cong cha nhu nui thai son” sentences in the thoca.txt file
Search the location, source and man page of the grep command:
Search the directory that contain the ls command:
10
Tăng Dư Yến - SE171310
OSG202 (Operating Systems)
- Using tar
Zip the thoca.txt file to the .tar extension:
Checking
11
Tăng Dư Yến - SE171310
OSG202 (Operating Systems)
Checking
Unzip .tar
Unzip .tar.gz
12