1. Show the steps to create a variable called NICKNAME which has a nickname for
ID: 3556774 • Letter: 1
Question
1. Show the steps to create a variable called NICKNAME which has a nickname for you in it; make this variable available to the environment
2.Show a command that uses re-direction of input and explain its purpose:
3.Provide a connected command sequence (i.e., multiple commands) where the commands run conditionally that is, where later commands only run if the prior commands have been successful.
4.Given the command: dd if=oldtemp of=newtemp conv=ebcdic
Describe each component of this command, specifically:
a) What does the 'dd' mean (i.e., what is the command for)?
b) What does the 'if=tempfile' option mean?
c) What does the 'of=newtemp' option mean?
d) What does the 'conv' clause do?
5.Describe the purpose of the following command: find . "(" -name a.out -o -name core ")" -exec rm {} ;
a) What files are trying to be 'found':
b) What does the '-o' do in this command?
c) What is the 'result' if the files are found?
d) What does the command do if the files are not found?
e) What does the '.' (dot) after the word 'find' mean?
Explanation / Answer
Ans 1. NICKNAME =$me
export NICKNAME ="u $ "
export NICKNAME =$me
________________________________________________________________________
Ans 2.$ mail cousin < my_typed_letter
The general use of Input Redirection is when you have some kind of file, which you have ready and now you would like to use some command on that file.
The above command would start the mail program i.e mail cousin with contents of the file named ' my_typed_letter ' as the input since the Input Redirection operator was used.
_________________________________________________________________________
Ans 3. The below example displays "You have access!" is user enter the password as 'secret' otherwise it displays ACCESS DENIED!
"
_______________________________________________________________________________
Ans 4. a) dd means to backup
b) if represents inputfile which is tempfile
c) of represents output file which is temp 2
d) conv means copy the file from ASCII to EBCDIC
So the exact copy of temp1 will be available in temp2 but temp2 will be converted to EBCDIC encoding.
_______________________________________________________________________
Ans 5. The fins command is used to find files in directory system.
find [path...] [expression]
a) Files named a.out Or; named core
b) if a.out is not found on the path loook for core
c) it will execute delete command on these found files
d) nothing will be done
e) Find all files that have read, write and executable permission
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.