<tfoot id='Fe8IO'></tfoot>

<i id='Fe8IO'><tr id='Fe8IO'><dt id='Fe8IO'><q id='Fe8IO'><span id='Fe8IO'><b id='Fe8IO'><form id='Fe8IO'><ins id='Fe8IO'></ins><ul id='Fe8IO'></ul><sub id='Fe8IO'></sub></form><legend id='Fe8IO'></legend><bdo id='Fe8IO'><pre id='Fe8IO'><center id='Fe8IO'></center></pre></bdo></b><th id='Fe8IO'></th></span></q></dt></tr></i><div id='Fe8IO'><tfoot id='Fe8IO'></tfoot><dl id='Fe8IO'><fieldset id='Fe8IO'></fieldset></dl></div>
  • <small id='Fe8IO'></small><noframes id='Fe8IO'>

      <legend id='Fe8IO'><style id='Fe8IO'><dir id='Fe8IO'><q id='Fe8IO'></q></dir></style></legend>
      • <bdo id='Fe8IO'></bdo><ul id='Fe8IO'></ul>

      1. 自动从网络服务器中删除文件

        时间:2023-10-30

            <bdo id='ZsAOA'></bdo><ul id='ZsAOA'></ul>

          • <legend id='ZsAOA'><style id='ZsAOA'><dir id='ZsAOA'><q id='ZsAOA'></q></dir></style></legend>
                <tbody id='ZsAOA'></tbody>

                <small id='ZsAOA'></small><noframes id='ZsAOA'>

              • <tfoot id='ZsAOA'></tfoot>
                  <i id='ZsAOA'><tr id='ZsAOA'><dt id='ZsAOA'><q id='ZsAOA'><span id='ZsAOA'><b id='ZsAOA'><form id='ZsAOA'><ins id='ZsAOA'></ins><ul id='ZsAOA'></ul><sub id='ZsAOA'></sub></form><legend id='ZsAOA'></legend><bdo id='ZsAOA'><pre id='ZsAOA'><center id='ZsAOA'></center></pre></bdo></b><th id='ZsAOA'></th></span></q></dt></tr></i><div id='ZsAOA'><tfoot id='ZsAOA'></tfoot><dl id='ZsAOA'><fieldset id='ZsAOA'></fieldset></dl></div>

                  本文介绍了自动从网络服务器中删除文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我需要从我的网络服务器中的目录中删除文件,并且我需要一些脚本来自动执行此操作.而且需要满足的条件也很少.

                  I need to delete files from a directory in my web-server and I need some script to do it automatic. And there is few more conditions which need to be fulfilled.

                  • 它必须清理目录然后总文件大小超过某些限制,例如 1.5GB
                  • 该文件将每 24 小时删除一次.
                  • 不会删除 10 ir 20 mins old 等新文件
                  • 如果上述所有条件都能同时起作用,那就太棒了.
                  • It has to clean the directory then total file size exceeds some certain limit for example 1,5GB
                  • That files would be deleted every 24 hours.
                  • New files like 10 ir 20 mins old would not be deleted
                  • It would be just awesome if all of the conditions above would be work at the same time.

                  对于删除文件,我正在考虑某种玉米任务,但我对它们一无所知,所以这对我来说很棘手.
                  要删除文件,然后达到一定的限制,我在想某种 PHP 脚本是我的帮助.可能有专门用于这些东西的库.
                  无论如何,我都会很高兴得到任何帮助.也许我只是需要一些新鲜的想法来为谷歌想出一个正确的关键字;P

                  For deleting files I was thinking of some kind of corn task but I do not know a thing about them so it is tricky for me.
                  To delete files then a certain limit is reached I was thinking that some kind of PHP script my help. May be there is a library meant for these things.
                  Any way I will be very happy for any kind of help. May be I just need some fresh thoughts to come up with a right keyword for google ;P

                  我的服务器在 linux 上运行.

                  My server runs on linux.

                  推荐答案

                  如果你的服务器运行的是 linux,cron 作业是最好的选择.只需编写一个脚本来检查您提到的条件(使用例如 stat 和其他一些工具)并在适用时删除文件,并将 crond 设置为每 24 小时运行一次.这里是cron的简短介绍.

                  If your server is running linux, a cron job is the best option. Simply write a script that checks the conditions you mention (using e.g. stat and some other tools) and deletes the file if they apply, and set crond to run it every 24 hours. Here's a short introduction to cron.

                  在 Windows 上,您可以使用脚本和计划任务执行类似的操作.

                  On Windows, you'd do something similar with a script and a scheduled task.

                  这篇关于自动从网络服务器中删除文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:单独的文件 &amp;PHP中的目录 下一篇:PHP:显示目录中的最新图像?

                  相关文章

                • <tfoot id='iA9fE'></tfoot>
                  • <bdo id='iA9fE'></bdo><ul id='iA9fE'></ul>

                  <legend id='iA9fE'><style id='iA9fE'><dir id='iA9fE'><q id='iA9fE'></q></dir></style></legend>

                    <i id='iA9fE'><tr id='iA9fE'><dt id='iA9fE'><q id='iA9fE'><span id='iA9fE'><b id='iA9fE'><form id='iA9fE'><ins id='iA9fE'></ins><ul id='iA9fE'></ul><sub id='iA9fE'></sub></form><legend id='iA9fE'></legend><bdo id='iA9fE'><pre id='iA9fE'><center id='iA9fE'></center></pre></bdo></b><th id='iA9fE'></th></span></q></dt></tr></i><div id='iA9fE'><tfoot id='iA9fE'></tfoot><dl id='iA9fE'><fieldset id='iA9fE'></fieldset></dl></div>

                      <small id='iA9fE'></small><noframes id='iA9fE'>