if条件中的-f在shell脚本中意味着什么



tmpFilename="buildDefTemp.txt"

if [ -f $tmpFilename ]; then
    rm -f $tmpFilename
fi
if [ -f $buildDefinitionFile ]; then
    rm -f $buildDefinitionFile
fi

http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_07_01.html

[ -f FILE ] True if FILE exists and is a regular file.

最新更新