有时当一个文件没有被使用时,在做替换是也会提示文件 busy,这个时候就需要用另一种方法来进行替换了,而不是直接解压覆盖。
思路:根据新文件位置和文件名,删除旧的文件,然后拷贝新文件过来。
遍历文件夹的shell方法:
#!/bin/bash
function ergodic(){
for file in ` ls $1 `
do
if [ -d $1"/"$file ]
then
ergodic $1"/"$file
else
echo $1"/"$file >> b
fi
done
}
INIT_PATH="/etc/httpd"
ergodic $INIT_PATH
aix 文件升级-替换
猜你喜欢
转载自luoqinglong.iteye.com/blog/1335601
今日推荐
周排行