1.

Which of the following commands or sequences of commands will rename a file x to file y in a Unix system?I. mv y, xII. mvx, yIII. cp y, x (rm x)IV. cp x, y (rm x)(A) II and III(B) II and IV(C) l and III(D) II only

Answer» Answer: (B)
Explanation: I. mv y, x //will move contentsof file x to file y

II. mvx, y //will move contentsof file yto file x

III. cp y, x (rm x) //will copy file x to file y (removal of x after the command)

IV. cp x, y (rm x) //will move contents file yto file x (removal of x after the command)



Discussion

No Comment Found

Related InterviewSolutions