实用脚本工具:文件恢复、日志记录与目录操作
在日常的系统操作中,我们常常会遇到文件删除误操作、难以查看目录详细内容以及文件查找困难等问题。为了解决这些问题,下面将介绍几个实用的脚本。
1. 文件恢复脚本 unrm
unrm 脚本用于恢复已删除的文件或目录。当脚本以文件名作为参数时,它会尝试恢复该文件或目录(如果只有一个匹配项),或者显示一个可恢复的候选列表,让用户指定要恢复的已删除文件或目录的版本。
使用方法 :
- 无参数运行:显示已删除文件存档中的内容。
$ unrm
Contents of your deleted files archive (sorted by date):
detritus this is a test
detritus garbage
- 指定文件名运行:如果有多个同名文件,脚本会显示更多关于该文件的信息。
$ unrm detritus
More than one file or directory match in the archive:
1) detritus (size = 7688Kb, deleted = 11/29 at 10:00:12)
2) detritus (size = 4Kb, deleted = 11/29 at
超级会员免费看
订阅专栏 解锁全文

被折叠的 条评论
为什么被折叠?



