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 MuntahaBrought to you by Warp, a free terminal reimagined to work like a modern app.
file
Command
Copy
[[ -f file ]]
Tags
Edit in GitHub
Copied