Check if a file exists and is a regular file

Returns an exit code of 0 if the file exists and is a regular file (i.e. is not a directory or a symbolic link).

Authored by: Sidratul Muntaha
file

Command
Copy
[[ -f file ]]
Tags