Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

Which of the following commands can be used to assure that a file 'myfile' exists? A. cp myfile /dev/null B. touch myfile C. create myfile

Which of the following commands can be used to assure that a file 'myfile' exists? A. cp myfile /dev/null B. touch myfile C. create myfile D. mkfile myfile

user-image
Question added by mohammed elsayed hesseny mohammed Elaidy , Service Level & Quality Management Engineer , TE-data
Date Posted: 2014/03/03
Hesam Shahbazi
by Hesam Shahbazi , Computer Engineer , Informatics Services Corporation

A is correct and B is incorrect. Because touch command creates the file if it doesn't exist. But we want just check the file existance, not create a new one.

sakthivel veeramuthu
by sakthivel veeramuthu , Linux Technical Support , Rox Trading & System Pvt Ltd

Hello Mohammed,

B.touch myfile->assure a 'myfile' exists

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.