1.

Which command is used for changing the current directory?(a) cd(b) cp(c) pwd(d) rmThis question was addressed to me in final exam.My question comes from File Handling Commands: pwd, cd in division The File System of Unix

Answer»

The correct answer is (a) cd

For explanation I would say: cd (change directory) command is used for moving around the file SYSTEM. cd command is usually invoked with a argument. After INVOCATION, it changes the CURRENT directory to the directory SPECIFIED as argument. Cp command is used for copying files while rm command is used for deleting files.

For example: our current directory is /bin/user06 and we want to change our directory to a directory named dir_one which is inside the user06 directory. To do so, TYPE the following:



Discussion

No Comment Found

Related InterviewSolutions