Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux 每当创建文件夹时将脚本发送到extrar rar_Linux_Bash_Shell_Scripting_Automation - Fatal编程技术网

Linux 每当创建文件夹时将脚本发送到extrar rar

Linux 每当创建文件夹时将脚本发送到extrar rar,linux,bash,shell,scripting,automation,Linux,Bash,Shell,Scripting,Automation,我想: 监视特定目录 如果在此控制器中创建了一个新文件夹,并且该文件夹包含rar多部分文件(rar、r01、r02、r03、r04…rn) 我需要在适当的地方提取这些文件 我可以使用命令提取它们 unrar x.rar但我不知道如何执行步骤1和步骤2(自动化流程) 我的linux版本是 Linux版本3.16.0-4-amd64(debian-kernel@lists.debian.org)(gcc版本4.8.4(Debian 4.8.4-1))#1 SMP Debian 3.16.7-ckt1

我想:

  • 监视特定目录
  • 如果在此控制器中创建了一个新文件夹,并且该文件夹包含rar多部分文件(rar、r01、r02、r03、r04…rn)
  • 我需要在适当的地方提取这些文件
  • 我可以使用命令提取它们
    unrar x.rar
    但我不知道如何执行步骤1和步骤2(自动化流程)

    我的linux版本是
    Linux版本3.16.0-4-amd64(debian-kernel@lists.debian.org)(gcc版本4.8.4(Debian 4.8.4-1))#1 SMP Debian 3.16.7-ckt11-1+deb8u2(2015-07-17)

    这应该是两个独立的问题。第一个问题的答案可能是:如果创建了新文件夹,并且多部分rar文件正在写入该目录,该怎么办?在提取之前,您需要确定它是何时完成的(所有必要的文件都已完全写出)。这使得过程更加复杂