1.

____ option is used for checking whether a particular file is older than a specified file.(a) -ef(b) -old(c) -nt(d) -otThe question was asked in an interview for job.My question comes from Using test and [ ] to Evaluate Expressions in portion Essential Shell Programming of Unix

Answer»

Right option is (d) -ot

Easiest explanation: If we have two file namely file01 and file02 and we WANT to CHECK if file01 is older than file02, we have to USE -ot option with test. The syntax is file01 -otfile02. Similarly, to check whether file01 is newer than file02 we’ve to use -nt option. These COMMANDS work in korn and bash shell only.



Discussion

No Comment Found

Related InterviewSolutions