由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Linux版 - shell Q: how to detect if a file exists
相关主题
how to copy one file into another?time出来的时间怎么对不上?
how to rename files -- waiting on linehow to install all available packages for an existing Linux
html给php传文件的问题,求解!archlinux没法升级
test. is forwording working?how to boot on network message?
有人装过wubi吗?你们谁的grub会有这种问题
matlab text-mode figure 是这么死的firefox 点到地址栏里,为什么地址不自动被选呢?
这里有群发邮件的专家或高手吗?这里有人玩motion detection嘛?
acrobat for linux哪里找?OpenCV 很方便啊
相关话题的讨论汇总
话题: file话题: exists话题: detect话题: real话题: shell
进入Linux版参与讨论
1 (共1页)
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 ?

1 (共1页)
进入Linux版参与讨论
相关主题
OpenCV 很方便啊有人装过wubi吗?
kao ,数组越界matlab text-mode figure 是这么死的
raid 1 failure这里有群发邮件的专家或高手吗?
我能问个linux的问题吗?版上大牛多,谢谢了acrobat for linux哪里找?
how to copy one file into another?time出来的时间怎么对不上?
how to rename files -- waiting on linehow to install all available packages for an existing Linux
html给php传文件的问题,求解!archlinux没法升级
test. is forwording working?how to boot on network message?
相关话题的讨论汇总
话题: file话题: exists话题: detect话题: real话题: shell