PART 4: Learn about commands to navigate the directory tree structure:
/ -------
|--bin
|--boot
|--dev
|--etc
|--home
|--lib
|--mnt
|--opt
|--root
|--sbin
|--tmp
|--usr
|--var
3. use the cd etc OR cd /etc to change your default directory to the etc directory
4. use the ls –ali command to review the contents of the /etc directory
5. now, change your directory to /dev and use the ls –ali command to review the contents of the /dev directory
6. get back to your home directory and use the mkdir test1 command to make a directory in your home directory
7. use the cd command to change into the test1 directory
8. create a file in the test1 directory by touch file1
9. use the ls command to view the details of the file1 , What options do you use to see the detail?
10. rm file1
11. exit the test1 directory
12. rmdir test1
13. use the cd, mkdir, and cp commands to make a directory named test in your home directory and copy the /etc/passwd file to /home/test/passwd.bak file
type: cp /etc/passwd passwd.bak
3.) cd etc
4.) ls -ali
5.) cd.
cd dev
ls -ali
6.) cd ~ // move to home directory
mkdir test1
7.) cd test1
8.) touch file1
9.) ls -lh // list with option -l and -h for detailed information
of files in human readable format
10.) rm file1 // delete file
11.) cd. // move to parent directory
12.) rmdir -r test1 // remove directory, -r is used for recursively
delete all containing files and directory as well.
13.) cd ~ // move to home directory
mkdir test // create test directory
cp /etc/passwd passwd.bak // copy file
Get Answers For Free
Most questions answered within 1 hours.