Which of the following option is used to check whether the entered input is a file or not?

Trần Vũ

New member
Which of the following option is used to check whether the entered input is a file or not?
Answer
While checking if a file exists, the most commonly used file operators are -e and -f. The
‘-e’ option is used to check whether a file exists regardless of the type, while the ‘-f’ option is used to return true value only if the file is a regular file (not a directory or a device).
 

Tìm kiếm

Back
Top