- Tags:
- Show more
- Pages:
- 1
- Words:
- 275
Unix Individual Assignment Student’s Name Institution Unix Individual Assignment 1. I am now in $HOME/sales/east directory. I want to have my login shell display me today’s date whenever I login every time by telnet. For this, what steps I have to do? (1/2) A. $ vi .profile Type one line : echo "Today’s date is `date`" $ chmod +x .profile $ . .profile B. $ cd ../.. $ vi .profile Type one line : echo "Today’s date is `date`" $ export .profile $ .profile C. $ cd $HOME $ vi .profile Type one line : echo "Today’s date is `date`" $ . .profile D. $ vi ~/.profile Type one line : echo "Today’s date is "date" $ . .profile Ans: The answer is D 2A. Why I am getting this error when I assign like this ? (1/2) $ FIRST-NAME=smith ksh: FIRST-NAME=smith: not found. Ans: The error is obtained because dash is never allowed to be used in variable name 2B. Under ksh or bash shell environments, what is the problem here ? (1/2) $ export PATH=/usr/bin /usr/local/bin /usr/ucb/bin Ans: export path=usr/bin:/usr/local/bin:/usr/ucb/bin 3. Executing cp temp/temp1 temp1.txt it will result in... (1/2) A. Error since the same filename is usedB. Error since an extension is used for the second temp1C. It will move the contents of temp1 from directory temp to temp1 of current directory, and when finished it will erase the contents of temp1 of temp directory D. It will copy temp1 from directory temp to temp1.txt of current directory Ans: The answer is D 4. What kind of files will be matched by the following when you list by ls command: (3) For Ex : $ ls Ans: It matches any file that has two
Leave feedback