Bash 脚本在完成第二部分之前将第一个 RAR 部分上传到 ftp(以节省时间和空间)

发布于 2024-09-16 04:01:20 字数 264 浏览 4 评论 0原文

我正在为我的服务器制作一个 bash 脚本,它用 RAR 打包一些目录并将其上传到其他 ftp 服务器,所以有些文件夹很大,我必须将它们分成几部分,并且必须等待所有部分都被稀有后再上传,这会消耗大量的时间和空间

,所以我想做得更快,比如,在完成后上传每个稀有部分,然后自动删除它,而无需等待其他所有部分,我知道有可能导致数据损坏或其他情况,但那就是我想要做什么,但我对从哪里开始脚本感到困惑。

服务器操作系统:Ubuntu 9.10

感谢

Kevin

i was making a bash script for my server which pack some directories with RAR and upload it to other ftp server, so some folders are big and i have to rar them in parts and have to wait for all parts to be rared before uploading them, which consumes lots of time and space

so i want to do it more fast like, upload every rared part on its completion and delete it afterwards automatically without waiting for another all parts, i know there are possibilities of getting data corrupted or else, but that's what i want to do and i confused about where to start the script.

Server OS: Ubuntu 9.10

thanks

Kevin

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

策马西风 2024-09-23 04:01:20
  • 在后台启动rar
  • 通过调用fuser foo.part2.rar 检查该部分的rar 是否完成。
  • 如果fuser没有返回任何内容,您可以将其传输到远程FTP。
  • Start rar in the background
  • Check wheter rar is finished on the part by calling fuser foo.part2.rar.
  • If fuser does not return anything, you can transfer it to the remote FTP.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文