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:Likewise. Yesterday I added a simple HTML link and where I would have scp'ed a tar and untared it, now I made a directory, ftp'ed the index, made another directory and mftp'ed the images.
Is there an easier way using ftp to unzip/untar files?
Code:
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:
--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:
--no-recursion
Replace or edit or remove "
Code:
--include=".*[.](php|js|css)$
Yes, this is more complicated than "
Code:
scp -p -r *.{php,js,css} ...
Statistics: Posted by mly — Fri Jul 19, 2024 12:34 am