Hello
Today I had a beautiful test to write some commands using Ubuntu, now I want to make sure of my answers to be reassured, if I had a mistake please correct me
- List all files details under ubuntu Desktop.
my answer:
cd Desktop |ls -l
- Navigate to your Desktop directory and write down the full path.
my answer:
pwd
- Create a directory under /home/ubuntu name the directory quiz.
my answer:
home@ubuntu:~$ mkdir ubuntu
home@ubuntu:~$ cd ubuntu
home@ubuntu:~/ubuntu$ mkdir quiz
home@ubuntu:~/ubuntu$ ls
quiz
home@ubuntu:~/ubuntu$ pwd
/home/home/ubuntu
- List all files which contain the letter p and redirect the output to a file under your quiz directory.
my answer:
ls p* > quiz
- Use grep command to extract the word time from ls manual and save the output to a file under your quiz directory.
my answer:
grep -t > quiz
- What does ls om*.su? do? Give an example for the output.
my answer:
list all files which content first letter o and second letter m and any letter in thread and have extension .su
- Student.txt file contains information about students which includes student Id,Student Name, subject, and Grade
04152:Jhon : COMP222:2 .5
04152:Smath : COMP222:3
0123:Sara: COMP222:3
03234:Lea: COMP222:2.5
From this file use linux command extract student number and grade and save this information in a new file grade.txt
my answer:
cp Student.txt > grade.txt
[quote=chirel;302524109]