Linux OS Shell Question:
Download Questions PDF

What would be the current working directory at the end of the following command sequence?

$ pwd
/home/user1/proj
$ cd src
$ cd generic
$ cd .
$ pwd
a) /home/user1/proj
b) /home/user1/proj/src
c) /home/user1
d) /home/user1/proj/src/generic

Linux Shell Interview Question
Linux Shell Interview Question

Answer:

d) /home/user1/proj/src/generic

Download Linux Shell Interview Questions And Answers PDF

Previous QuestionNext Question
How do you print the lines between 5 and 10, both inclusive?
a) cat filename | head | tail -6
b) cat filename | head | tail -5
c) cat filename | tail +5 | head
d) cat filename | tail -5 | head -10
Tell me which of the following commands allows definition and assignment of environment variables under bash:
a) env
b) export
c) environ
d) setenviron