RHSA 特殊文件的处理和删除
[ 2026-06-11 22:39:48 | 作者: admin ]
p.s. takeown 处理后可以移动到备份文件里面
文件夹处理
单个文件
评论Feed: http://blog.xg98.com/feed.asp?q=comment&id=3017
文件夹处理
takeown /f "D:\目标文件夹" /r /d y
icacls "D:\目标文件夹" /grant Administrators:F /t
attrib -r -h -s -a "D:\目标文件夹" /s /d
rmdir /s /q "D:\目标文件夹"
icacls "D:\目标文件夹" /grant Administrators:F /t
attrib -r -h -s -a "D:\目标文件夹" /s /d
rmdir /s /q "D:\目标文件夹"
单个文件
1. 获取所有权(去掉 /d y)
takeown /f "D:\test\xxx.file"
2. 授予管理员完全控制权限
icacls "D:\test\xxx.file" /grant Administrators
3. 清除只读、隐藏、系统、存档属性
attrib -r -h -s -a "D:\test\xxx.file"
4. 强制删除
del /f /q "D:\test\xxx.file"
takeown /f "D:\test\xxx.file"
2. 授予管理员完全控制权限
icacls "D:\test\xxx.file" /grant Administrators
3. 清除只读、隐藏、系统、存档属性
attrib -r -h -s -a "D:\test\xxx.file"
4. 强制删除
del /f /q "D:\test\xxx.file"
[最后修改由 admin, 于 2026-06-11 22:45:58]
评论Feed: http://blog.xg98.com/feed.asp?q=comment&id=3017
这篇日志没有评论。
此日志不可发表评论。






