Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

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 ajoutée par mohammed elsayed hesseny mohammed Elaidy , Service Level & Quality Management Engineer , TE-data
Date de publication: 2014/03/03
Hesam Shahbazi
par 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
par sakthivel veeramuthu , Linux Technical Support , Rox Trading & System Pvt Ltd

Hello Mohammed,

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

More Questions Like This