In this hands-on lab, we will practice using absolute and relative paths. Understanding the difference between absolute and relative paths is a critical component to working with files and directories in Linux.
Learning Objectives
Successfully complete this lab by achieving the following learning objectives:
- Use Absolute Paths to Move the File
- Use
cat
and redirection to place the contents of the filePractice/Test/free
into a new file namedvalue.txt
in your home directory.cat /home/cloud_user/Practice/Test/free > /home/cloud_user/value.txt
- Use
- Use Relative Paths to Move the File
- Change to the
/usr/share
directory.cd /usr/share
- Use
cat
and redirection to place the contents of the filePractice/Test/sys/fs/xfs/stats/stats
into the newly created filevalue.txt
in your home directory.cat ../../home/cloud_user/Practice/Test/sys/fs/xfs/stats/stats >> ../../home/cloud_user/value.txt
- Change to the