F*EX use case: Internet clipboard


  Michael: Marianne, do you know 'xx' from the house of F*EX?
  Marianne: No, Michael, what can we do with it?
  Michael: Transfering files even faster and smartly as with fexsend!
  Marianne: NO, Michael, is it possible!? This is UNBELIEVABLE!!


I have n accounts on y hosts, which have different names and rights, including administrative accounts like root or webmaster. With them I want to swap files "on the fly". Mostly I cannot use scp or sendfile because of router firewalls and port restrictions, on which I do not have influence. Even worse it gets with DHCP.

With fexsend for UNIX there is already a quite good solution, but not that fast and smart.
Within fexsend comes xx (as symlink). This provides an extremly easy file transfer, an internet clipboard!

On Windows you can use fexit, to access the F*EX clipboard and exchange files between Windows or UNIX hosts.
Alternativly you can install Cygwin to use xx.

Example 1

  fex@fex:~/htdocs/download: xx schwuppdiwupp*
  making tar transfer file /home/fex/.fex/tmp/STDFEX :
  /home/fex/.fex/tmp/STDFEX: 4 MB in 1 s with 4671 kB/s
(switching account)

  framstag@moep:/export/tmp: xx
  Files in transfer-container:
  -rwxr-xr-x fex/www-data 3665199 2008-09-22 16:49 schwuppdiwupp
  -rwx------ fex/www-data 3808769 2008-11-04 17:42 schwuppdiwupp.exe
  -rwxr-xr-x fex/www-data   41856 2008-12-05 18:35 schwuppdiwupp.pl
  Extract these files? y

Example 2

  framstag@fex:/export/tmp: xx p1140397_divx3.avi
  making tar transfer file /home/framstag/.fex/tmp/STDFEX:
  /home/framstag/.fex/tmp/STDFEX: 488 MB in 53 s with 9129 kB/s
(switching account)

  framstag@moep:/export/tmp: xx
  Files in transfer-container:
  -rw-r--r-- framstag/user 488665199 2011-09-02 20:49 p1140397_divx3.avi
  Extract these files? y
(switching account)

  root@tandem:/home/httpd/virtual/tandem-fahren.de/htdocs/tmp: xx --

Example for STDIN/STDOUT

  framstag@tandem:/home/httpd/virtual/tandem-fahren.de/htdocs/tmp: ls -l | xx
  /home/framstag/.fex/tmp/STDFEX: 1 kB in 1 s with 1 kB/s
(switching account)

  fex@fex:~: xx
  total 9552
  -rwxr-xr-x 1 framstag tandem  211893 2008-12-14 16:56 p1140056.jpg
  -rw-r--r-- 1 framstag tandem 9529794 2009-01-12 18:41 p1140397_divx3.avi
  -rwxr-xr-x 1 framstag tandem    2946 2008-08-07 11:12 quotefix
  -rw-r--r-- 1 framstag tandem    7509 2008-10-06 11:39 tmp.gif
  -rw-r--r-- 1 framstag tandem      48 2008-10-06 11:39 xx.html

But what if one does not have fexsend initialized on the receiving side (no F*EX ID)?

Then simply copy (with mouse) the output from fexsend -I from your local to the remote shell account! Example:

  framstag@tandem:~: fexsend -I
  export FEXID=U2V0ZWMgQXN0cm9ub215Cg==;history -d $((HISTCMD-1))


With xx one has a network wide clipboard for files or STDIN/STDOUT between different accounts on different hosts, even behind firewalls and NAT networks!

xxx: extended xx Internet clipboard

xxx is an extension of xx and stores files or pipe data with versioning.

Example pipe data upload:

  tux@obertux: sysinfo | xxx
  xxx_1518606718.gz: 1 kB in 1 s = 1 kB/s        

Example files upload:

  tux@obertux: xxx *png
  xxx_1518607608.tgz: 889 kB in 1 s = 889 kB/s          

Example download:

  framstag@moep:/tmp: xxx
    #1 [framstag@moep] Da-Bach-Na-Fahrt.mp4
    #2 [framstag@moep] -
    #3 [tux@obertux] -
    #4 [tux@obertux] phoon.png xplanet.png
  get number: 4
  checking storage... 1 MB ok!
  xxx_1518607608.tgz: 1 MB in 1 s (1113 kB/s)
  Files in archive:
  -rw-r--r-- tux/users  38752 2017-08-01 00:00 phoon.png
  -rw-r--r-- tux/users 876094 2017-08-01 18:41 xplanet.png
  extract to directory ("-" to keep archive): ./

Example quick download (dont-ask-any-question-just-download-last-upload):

  framstag@moep:/tmp: xxx -
  checking storage... 1 MB ok!
  xxx_1518607608.tgz: 1 MB in 1 s (1113 kB/s)
  extracting to /local/home/framstag :

You can also download the xxx transfer archives with any webbrowser or webclient.

  framstag@moep:/tmp: xxx -l
  [framstag@fex] - (1 MB, 1 d)
  [framstag@fex] phoon.png xplanet.png (2 MB, 1 d)

Full usage:

file upload:       xxx [-m LIMIT] [-k DAYS] [-z] FILE...
pipe upload: ... | xxx [-m LIMIT] [-k DAYS] [-t] [COMMENT]
download:          xxx [-m LIMIT] [-o] [-|DATE_TIME]
delete:            xxx -d [-|DATE_TIME|REGEXP]
other:             xxx [-l] [-w] [-u] [-x] [-X] [-k DAYS DATE_TIME|URL]
  -m  limit throughput (kB/s)
  -k  keep DAYS (default: 1 day)
  -z  force compression
  -t  text mode
  -o  overwrite existing files
  -d  delete
  -l  list
  -u  generate upload function to be used by other users
  -x  show xxx propagation shell code (with your F*EX ID!)
  -X  same as -x, but generate URL shell command

xxx -u gives you shell code for copy&paste to another host which generates a bash upload function (uses curl).

xxx -x gives you shell code for copy&paste to another host which installs xxx in /tmp/ and it copies your FEXID, which you need for authorization.

With these commands you can use your F*EX clipboard on any UNIX host in the Internet!

To install fexsend, xx and xxx, use:

  wget http://fex.belwue.de/download/fex.pl && perl fex.pl