Quantcast
Channel: Sonic.net
Viewing all articles
Browse latest Browse all 824

Labs • Re: Shell Server Turn Down

$
0
0
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?
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:

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
Remove "

Code:

--dry-run
" to make it actually do anything.
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
" if you wish to not not recurse. (I happen to not wish to, in my one simple particular use case.)

Replace or edit or remove "

Code:

--include=".*[.](php|js|css)$
" for the files you wish to upload.

Yes, this is more complicated than "

Code:

scp -p -r *.{php,js,css} ...
" but here we are in The Future in the 2020s, and everything is always getting far far far worse, rapidly. (Software, that is ... that whole trivial "fascism on top of death of the global ecosphere" business aside.)

Statistics: Posted by mly — Fri Jul 19, 2024 12:34 am



Viewing all articles
Browse latest Browse all 824

Trending Articles