具有“上传修改后的文件”功能的 FTP 客户端

具有“上传修改后的文件”功能的 FTP 客户端

我正在寻找一个 FTP 客户端,它允许我轻松“上传自上次上传以来已修改的文件”。 (或根据修改日期“同步”目录。)

我在 Ubuntu 上。

到目前为止我已经尝试了 gnome-commander、gftp 和 midnight commander。

(我知道我可以挂载 ftp 文件系统并使用,cp -u但我对 FTP 挂载的文件系统有很多不好的经历。)

答案1

我使用 FileZilla,但听起来您确实想使用 Rsync...而不使用 SSH,尽管您可以使用 lftp。

http://lftp.yar.ru/lftp-man.html

来自手册页: mirror [OPTS] [source [target]]

 Mirror specified source directory to local target directory.
 If  target directory ends with a slash, the source base name
 is appended to target directory name. Source  and/or  target
 can be URLs pointing to directories.

      -c, --continue      continue a mirror job if possible
      -e, --delete        delete files not present at remote site
          --delete-first       delete old files before transferring new ones
          --depth-first        descend into subdirectories before transferring files
      -s, --allow-suid         set suid/sgid bits according to remote site
          --allow-chown   try to set owner and group on files
          --ascii         use ascii mode transfers (implies --ignore-size)
          --ignore-time        ignore time when deciding whether to download
          --ignore-size        ignore size when deciding whether to download
          --only-missing  download only missing files
          --only-existing download only files already existing at target
      -n, --only-newer    download only newer files (-c won't work)
          --no-empty-dirs don't create empty directories (implies --depth-first)
      -r, --no-recursion  don't go to subdirectories
          --no-symlinks   don't create symbolic links
      -p, --no-perms      don't set file permissions
          --no-umask      don't apply umask to file modes
      -R, --reverse       reverse mirror (put files)
      -L, --dereference   download symbolic links as files
      -N, --newer-than=SPEC    download only files newer than specified time
          --on-change=CMD      execute the command if anything has been changed
          --older-than=SPEC    download only files older than specified time
          --size-range=RANGE   download only files with size in specified range
      -P, --parallel[=N]  download N files in parallel
          --use-pget[-n=N]     use pget to transfer every single file
          --loop          loop until no changes found
      -i RX, --include RX include matching files
      -x RX, --exclude RX exclude matching files
      -I GP, --include-glob GP include matching files
      -X GP, --exclude-glob GP exclude matching files
      -v, --verbose[=level]    verbose operation
          --log=FILE      write lftp commands being executed to FILE
          --script=FILE        write lftp commands to FILE, but don't execute them
          --just-print, --dry-run   same as --script=-
          --use-cache          use cached directory listings
      --Remove-source-files    remove files after transfer (use with caution)
      -a             same as --allow-chown --allow-suid --no-umask

剩下的我就不说了。够写一本中篇小说了。

答案2

我刚刚发现网站复制它确实满足了我的要求。我刚刚输入

site myftpsite
    server ftp.myftpsite.com
    remote /
    local /home/aioobe/work/mysite/public
    username myuser
    password mypass

然后我只需输入sitecopy --update myftpsite,它就会根据时间戳“同步”文件。

相关内容