FTP 文件正在使用中 报错
时间:2011-07-22
来源:互联网
本帖最后由 sunnylsj 于 2011-07-22 14:05 编辑
test.sh
复制代码
执行 test.sh A001
会报错
123.txt: Cannot open or remove a file containing a running program.
--------------
有点混乱,这个文件在FTP什么情况下 才是一个施放的状态呢。
我的本意 是把$loop 给mput出去的。也是报这个 Cannot open or remove a file containing a running program.
然后就想cp个新文件,还是不行? 有人知道这个什么原因不?感谢
test.sh
- WORK_PATH=/path1/files
- fillname=$1
- cd $WORK_PATH
- for loop in `ls ${fillname}*.TXT`
- do
- echo $loop
- cp $loop ${WORK_PATH}/123.txt
- done
- ftp -ivn 192.168.0.1 <<!!! >ftp.log
- user user user
- lcd $WORK_PATH
- cd /path2/
- mput ${WORK_PATH}/123.txt
- by
- !!!
会报错
123.txt: Cannot open or remove a file containing a running program.
--------------
有点混乱,这个文件在FTP什么情况下 才是一个施放的状态呢。
我的本意 是把$loop 给mput出去的。也是报这个 Cannot open or remove a file containing a running program.
然后就想cp个新文件,还是不行? 有人知道这个什么原因不?感谢
作者: sunnylsj 发布时间: 2011-07-22
AIX 系统?
Method 1
1. Execute the slibclean command. This will removes unused kernel & library memory modules
# slibclean
Method 2
1. If you encountered this error while dealing with FTP session, you need to kill the related FTP session and restart the process again.
# ps -ef | grep ftpd
# kill -9 <Process-ID>
Additional note:
We need to kill the process that locked the file.
Method 3 (Dirty way)
1. In case, you encountered the error while copying the files over AIX. You can trick the system by move the file instead of copy. But, make sure to make a backup of the file before move.
Method 1
1. Execute the slibclean command. This will removes unused kernel & library memory modules
# slibclean
Method 2
1. If you encountered this error while dealing with FTP session, you need to kill the related FTP session and restart the process again.
# ps -ef | grep ftpd
# kill -9 <Process-ID>
Additional note:
We need to kill the process that locked the file.
Method 3 (Dirty way)
1. In case, you encountered the error while copying the files over AIX. You can trick the system by move the file instead of copy. But, make sure to make a backup of the file before move.
作者: rdcwayx 发布时间: 2011-07-22
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28