Question
Please show answer in Ubnuntu screenshots of command terminal screenshots, or typed, thank you. Create the appropriate directories. Using change directory command, move to each
Please show answer in Ubnuntu screenshots of command terminal screenshots, or typed, thank you.
Create the appropriate directories.
Using change directory command, move to each directory and create the file this.dir with the appropriate contents (provided below) using any of the techniques youve learned so far: for example, you can use the command cat > this.dir from each directory to type in the content; or you can use Notepad, then dos2unix utility, etc.
The texts must be typed exactly as shown (omit the first lines; they indicate which directory the content should go).
~/IFT383/Labs/Lab2/Tests
#!/usr/bin/ksh
#this is a file to teach directory, PATH and quoting
#it should be in ~/IFT383/Labs/Lab2/Tests directory
cwd=`pwd`
echo $cwd
echo is the current working directory
echo this file is in the
echo "~/IFT383/Labs/Lab2/Tests" directory
~/IFT383/Labs/Lab2/Bin
#this is a program to teach directory and PATH and quoting.
#it belongs in your ~/IFT383/Labs/Lab2/Bin directory
echo this is directory "$HOME/IFT383/Labs/Lab2/Bin"
echo you executed it from
echo `pwd`
~/IFT383/Labs/Lab2/Bin/Puz
#this is a file to help understand PATH, directory and quoting
#it belongs in your ~/IFT383/Labs/Lab2/Bin/Puz directory
echo this is directory '$HOME/IFT383/Labs/Lab2/Bin/Puz'
echo you executed this script from 'pwd'
~/IFT383/Labs/Lab2/SS16mail
#this is a file to aid in learning PATH, directory and quoting
#it belongs in the directory '$HOME/IFT383/Labs/Lab2/SS16mail'
echo this is directory "$HOME/IFT383/Labs/Lab2/SS16mail"
echo `pwd`
echo is where you are now
~/IFT383/Labs/Lab2/SS16mail/In383
#this is a directory program to aid in learning PATH and directories.
#it belongs in the directory ~/IFT383/Labs/Lab2/SS16mail/In383
echo this program resides in directory \
'~/IFT383/Labs/Lab2/SS16mail/In383'
echo this program was executed from directory
echo `pwd`
$HOME
#this is a file to help teach PATH and directory
#this file should be in your home directory
echo this is my home directory
echo I executed this program from directory
echo `pwd`
~/IFT383/Labs/Lab2/SS16mail/In383/Asg1
#this.dir is a file to aid in learning path, directory, and quoting
#this.dir belongs in directory
#~/IFT383/Labs/Lab2/SS16mail/In383/Asg1
echo this file is in a directory which is a subdirectory of
echo ~/IFT383/Labs/Lab2/SS16mail/In383
echo the directory name is Asg1, full pathname is
echo $HOME/IFT383/Labs/Lab2/SS16mail/In383/Asg1/this.dir
echo you executed it from directory
echo `pwd`
After youve created the above files and directories, type your answers to the questions below in file lab2A.2. Note that the commands are executed sequentially from #1 to #8.
The semi-colon (;) is used to execute more than one command at a time.
cd ~/IFT383/Labs/Lab2/Tests; pwd
Output?
cat ../Bin/this.dir
Output?
Provide the full pathname of the file displayed or sought
cd ~/IFT383/Labs/Lab2/SS16mail; pwd; cat this.dir
Output?
cat ../../../this.dir
Output?
Provide the full pathname of the file displayed or sought
pwd; cat ~/this.dir; echo ~/Bin/Puz/this.dir
Output?
cd ~/IFT383/Labs/Lab2/SS16mail/In383; pwd
Output?
cat ../../Tests/this.dir
Output
Provide the full pathname of the file displayed or sought
cat ./Asg1/this.dir
Output?
Provide the full pathname of the file displayed
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started