Archive for fundametal unix questions and answers
You are browsing the archives of fundametal unix questions and answers.
You are browsing the archives of fundametal unix questions and answers.
1. UNIX can be best described as
a) Single user-single processing system
b) Single user-multi processing system
c) Multi user-single processing system
d) Multi user-multi processing system
2. Kernal refers to inode by index from
a) Super block
b) Boot block
c) Data block
d) None of the above.
3. Which is not a SCCS command?
a) Admin
b) get
c) ps
d) none
4) Which is the correct [...]
1. What will the output be for the following commands:
a. $ tr –s str1
b. $ tr –s str1 str1
i. command a. gives error and command b gives output same as the input
ii. command a. removes (deletes) all occurrences of str1 and command b gives output same as the input
iii. command a. gives error and command b. replaces multiple occurrences of [...]
1. what will cat foo foo foo display?
2. to append .c to a variable x, you have to use
a.) echo $x.c
b.) echo $x”.c”
c.)echo ${x}.c
d.) none of these
e.) any of these
3. if TERM has the value vt220, where will you expect to find its control file?
4. find out the no. of words in this string as [...]
(1) when we copy one directory to another directory,does the hidden files also get copied ?
Ans. No
2)How to list the attributes of the current directory ?
Ans ls -ld .
3.) How hidden files are removed ?
Ans rm .[!.]*
4.)Can the filename contain / character?
Ans No
5)What is the limit on the length of the filename in unix ?
Ans [...]
1. Variables delclared in a shell script can be displayed at the dollar prompt using the set command. (True or False)
Ans. False. As a new shell is created for every shell script, the variables are destroyed at the end of the script.
2. What is the use of the the unix system calls fork() and exec()?
Ans. [...]
1) What would be the output of the following command?
$> >>xxtty
Ans: Create a new blank file xxtty
2) What would be the output of &> >> junk echo hello where junk is existing file.
Ans: append hello to file junk
3) What is the use of -m and -p options in mkdir command?
Ans : -m option [...]