Relative versus Absolute Lab Assuming that you have a directory structure like t
ID: 3751553 • Letter: R
Question
Relative versus Absolute Lab Assuming that you have a directory structure like the image below, answer the questions below ept tmp maill dirl test.sh clean.sh file8 filefile10 filet file ile ol filez file5 filel 1. If your current working directory is /home/sue, what is the command that will display how much space is taken up by the scripts directory and its contents using a relative path only? 2. Repeat the command above, but redirect the output to a file named file9 in your home directory 3. If your current working directory is /home/sue what is the command to display any of the last 8 lines of file5 that contain the text error using a relative path only? 4. If your current working directory is /home/tom/scripts what is the command to display all of the lines of the file clean.sh that contain the text "Port" on the screen using relative paths only? opt heme tap maill test.sh clean.sh files files file10 filel file file eld ile2 file5 file1Explanation / Answer
As we are allowed to answer only 4 subparts, please post new questions.
1. du -h ../home/tom/scripts will give us human readable disk usage
2. du -h ../home/tom/scripts > /home/file9 will redirect the output to the file specified
3. grep "error" ../home/tom/docs/old/file5 | tail -n8; tail -f -n0 ../home/tom/docs/old/file5 | grep "error"; will return last 8 lines that contains the text error
4. grep "Port" clean.sh
In case of any doubts, please comment.