perl 调用rm -rf 递归删除指定文件夹,提示 can not remove: not empty 原因
来源:互联网 发布:手绘软件下载mac 编辑:程序博客网 时间:2024/06/10 17:33
my $dir = "/root/syn/Design/test.txt";
open $fh_dir, "> $dir " or die"$!";
chdir "/root/syn/" or die "$!";
system "rm -rf Design";
句柄锁定了该目录,因此perl不会再允许对该目录进行删除,避免引起冲突
my $dir = "/root/syn/Design/test.txt";
#open $fh_dir, "> $dir " or die"$!";
chdir "/root/syn/" or die "$!";
system "rm -rf Design";
注释掉,open之后,报错解决
如果有朋友遇到,算是一个提醒吧,
0 0
- perl 调用rm -rf 递归删除指定文件夹,提示 can not remove: not empty 原因
- rm: cannot remove `dir-name': Directory not empty(文件夹里有.fuse_hidden0000007f00000002)
- rm: cannot remove `/usr/local/tmp/': Directory not empty
- docker 1.13 centos7 mv: can't remove : Directory not empty
- Linux删除文件夹命令--rm -rf
- 强制删除文件:rm -rf 文件夹
- rm -rf递归删除子目录中的文件
- “rmdir: failed to remove ‘tmp’: Directory not empty”解决方案–Linux命令行如何删除非空文件夹
- linux rm -f rm -rf 命令:删除文件和文件夹
- linux下删除指定文件夹目录下指定的文件名命令( find 指定的文件夹/ -name this.html~ |xargs rm -rf)
- Remove Empty Directories:删除空文件夹
- 递归删除指定文件夹
- rm: cannot remove `xxx': Operation not permitted
- remove a directory which is not empty
- python 调用C 动态库 提示can not find symbol
- rm: 0653-611 Directory xxxxx is not empty
- rm -rf 删除文件失败
- 关于rm -rf删除操作
- angularjs之directive实例
- ManualResetEvent在线程里简单应用
- STL sort的使用
- Http协议
- 动态按钮,滑动条
- perl 调用rm -rf 递归删除指定文件夹,提示 can not remove: not empty 原因
- Android开发中单例模式写法与可能遇到的坑
- Swift - 贝赛尔曲线
- MFC中的小问题,求教!!!!
- 8051单片机的I/O口
- 协议
- java 多线程 CountDownLatch用法
- Python绝技笔记--------Zip压缩文件密码爆破小脚本
- 美团外卖订单中心的演进