As I wasted more than one trial-and-error hour of my life on this, for reference here's what I use for my one specific hosting case:
Code: Select all
lftp -e 'mirror --dry-run --verbose --reverse --no-recursion --include=".*[.](php|js|css)$" ~/LOCAL-DIRECTORY/ /home/WWW_pages/USERNAME/REMOTE-DIRECTORY/' USERNAME@ftp.sonic.net
Code: Select all
--dry-run
lftp is such a hammer-in-search-of-a-nail morass ("YOU HAD ONE JOB!") that you really really want to be super careful before you let it loose on anything.
Remove "
Code: Select all
--no-recursion
Replace or edit or remove "
Code: Select all
--include=".*[.](php|js|css)$
Yes, this is more complicated than "
Code: Select all
scp -p -r *.{php,js,css} ...