Commit 7c9edd79 authored by Pierre Neidhardt's avatar Pierre Neidhardt

power-apps: Mention advanced rsync and wget for file transfer.

parent c0dd9daa
Pipeline #156030896 passed with stages
in 1 minute and 15 seconds
......@@ -240,25 +240,58 @@ My personal listing:
- =mcron= is a rewrite of the venerable =cron= in Scheme (Guile). Jobs can be
declared in Scheme, which allows for programming jobs.
+ *Local file sharing:* woof, python
+ *Local file sharing:* woof, python, rsync
FTP is sometimes blocked by routeurs, plus HTTP is more accessible for people
running poor systems.
FTP is sometimes blocked by routeurs and it does not offer many advantages for
casualy file sharing. HTTP is more accessible for people running poor
systems, while Rsync is more powerful (e.g. partial transfers).
- =woof= is very convenient to share single files over HTTP with anyone. It
also support an upload form so that other people can send you files. =woof=
does not support sharing of directories (without taring them first, that is to
say).
also support an upload form so that other people can send you files. =woof=
does not support sharing of directories (without taring them first, that is to
say).
- =python= also comes with a simple HTTP server:
#+BEGIN_SRC sh
python3 -m http.server
#+END_SRC
or, with Guix:
#+BEGIN_SRC sh
guix environment -C -N --ad-hoc python -- python3 -m http.server
#+END_SRC
The python HTTP server automatically shares the entire current directory.
#+BEGIN_SRC sh
python3 -m http.server 8080
#+END_SRC
or in a Guix container for extra security:
#+BEGIN_SRC sh
guix environment -C -N --ad-hoc python -- python3 -m http.server 8080
#+END_SRC
The python HTTP server automatically shares the entire current directory.
While the client can use any browser to fetch the files one by one, =wget= is
more convenient to fetch everything at once while enabling compression:
#+BEGIN_SRC sh
wget -R 'index.html*' -r --content-disposition --compression=gzip "[email protected]"
#+END_SRC
In the above we exclude 'index.html' otherwise they would be created for
every directory.
- Finally, if you need more fine-tuned data transfer options such as
only transfering the portion of the files that changed) and
preserving permissions, consider using =rsync=.
A server can be started without privilege using the =--daemon= option and
using a port in the allowed range (typically 1024).
See my [[https://gitlab.com/ambrevar/dotfiles/-/blob/4221e45956ea848408ba671b80bb8767c21a54be/.local/bin/rshare][rshare]] script which acts as a convenience wrapper:
#+begin_src sh
rshare /my/folder
#+end_src
The client can then run:
#+begin_src sh
rsync -azzPiv rsync://HOST:PORT /path/to/destination
#+end_src
=-P= enables partial transfers and shows progress. =-zz= enables
compression. =-i= shows the changes that are applied (e.g. a change in
permissions).
+ *Music:* Beets, clyrics, cmus, Demlo, Emacs (EMMS), mps-youtube, youtube-viewer
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment