w*s 发帖数: 7227 | 1 if [ -f real_file ]
can detect if "real_file" exists,
now i link a file to real_file,
ln -s real_file file_reference
this file_reference always exists,
even if i delete real_file.
but my script just want to detect if the file is really there
using file_reference.
how to do that pls ? | j*a 发帖数: 14423 | 2 -e file
True if file exists.
【在 w*s 的大作中提到】 : if [ -f real_file ] : can detect if "real_file" exists, : now i link a file to real_file, : ln -s real_file file_reference : this file_reference always exists, : even if i delete real_file. : but my script just want to detect if the file is really there : using file_reference. : how to do that pls ?
|
|