Lab 2: Using Basic Linux Commands: Learning Outcome
Lab 2: Using Basic Linux Commands: Learning Outcome
Submission
Upload the word file to cms describes some requirements:
Present the content of manipulating of some commands (including syntax, what does it
for?, examples) as
o su
o env
o mkdir, cp, mv, rmdir, ln, cat, rm
o chown, chgrp, chmod
o find
o ds, df
o ps, top, kill, jobs
Capture the terminal screen using the “ls –al” to view all the files that are done at tutorial in
File manage.
Tutorial
Content
1- Using command line in Linux
2- File managemant
Example:
Result:
Execute the man command to explore the following commands and write down their
functional operations and their parameters (this is a part of your report that will be
submitted to CMS) :
o su
o env
o mkdir, cp, mv, rmdir, ln, cat, rm
o chown, chgrp, chmod
o find
o ds, df
o ps, top, kill, jobs
2- File management
EXAMPLES
/ (root directory)
---hdh
|--- unix
| |--- linux
| |--- freebsd
| |--- openbsd
|
|--- windows
|--- 98
|--- 2000
|--- 2003
o Adding the “Nghia me nhu nuoc trng nguon chay ra” sentence into thoca.txt:
……………..
Notes: The “?” or “*” characters can be used as wild characters in copying:
Move objects: mv
o Move the thoca.txt file in the linux library to the openbsd library:
Rename: mv
o Rename the windows directory in the openbsd directory to wins:
o Copy the thoca.txt directory in the openbsd directory to the freebsd directory and
rename to baitho.doc
Delete a file: rm
o Delete the thoca.txt file in openbsd directory:
The other options can be used as: -type, -user, -atime, -amin, -newer,…
o Search the “Cong cha nhu nui thai son” sentences in the thoca.txt file
o Search the location, source and man page of the grep command:
o Using tar
Zip the thoca.txt file to the .tar extension:
Checking
Checking
Unzip .tar
Checking
END