Linux 使inotifywait监视符号链接
我正在搜索一种通知层次结构修改的方法,但我有符号链接,我希望对修改文件上的每个符号链接都有一个明确的通知Linux 使inotifywait监视符号链接,linux,shell,filesystemwatcher,Linux,Shell,Filesystemwatcher,我正在搜索一种通知层次结构修改的方法,但我有符号链接,我希望对修改文件上的每个符号链接都有一个明确的通知 一个诀窍是使用find找到它们,但我更喜欢更干净的东西:我想到了这样的东西,它很管用,但我不喜欢它: for f in $(find -L $SOURCE_DIR -samefile "$folder$file") do if [ -L "$f" ] then do_something_with_the_link $(dirname "$f")/ $(base
一个诀窍是使用find找到它们,但我更喜欢更干净的东西:我想到了这样的东西,它很管用,但我不喜欢它:
for f in $(find -L $SOURCE_DIR -samefile "$folder$file")
do
if [ -L "$f" ]
then
do_something_with_the_link $(dirname "$f")/ $(basename "$f")
fi
done
我想到了这样的东西,它是有效的,但我不喜欢它:
for f in $(find -L $SOURCE_DIR -samefile "$folder$file")
do
if [ -L "$f" ]
then
do_something_with_the_link $(dirname "$f")/ $(basename "$f")
fi
done
实际符号链接(而非实际文件)的更改频率如何?他们一整天都保持静止吗?实际的符号链接而不是实际的文件多久会改变一次?他们一整天都不动吗?