F*EX use case: Internet clipboard

<TV-commercial>

  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!!

</TV-commercial>

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 :
  schwuppdiwupp
  schwuppdiwupp.exe
  schwuppdiwupp.pl
  /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
  schwuppdiwupp
  schwuppdiwupp.exe
  schwuppdiwupp.pl

Example 2

  framstag@fex:/export/tmp: xx p1140397_divx3.avi
  making tar transfer file /home/framstag/.fex/tmp/STDFEX:
  p1140397_divx3.avi
  /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
  p1140397_divx3.avi
(switching account)

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

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))

Conclusion

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
  phoon.png                                      
  xplanet.png
  xxx_1518607608.tgz: 889 kB in 1 s = 889 kB/s          

Example download:

  framstag@moep:/tmp: xxx
  server/user: http://fex.belwue.de/framstag@rus.uni-stuttgart.de
    1)       16 MB [framstag@moep] Da-Bach-Na-Fahrt.mp4
    2)        0 MB [framstag@moep] -
    3)        0 MB [tux@obertux] -
    4)        1 MB [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): ./
  phoon.png
  xplanet.png

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 :
  phoon.png
  xplanet.png

You can also download the xxx transfer archives with any webbrowser or webclient.
Just list the download commands and URLs:

  framstag@moep:/tmp: xxx -l
  
  [framstag@fex] -
  xxx 1518606718
  wget -qO- https://fex.rus.uni-stuttgart.de/fop/uXxK4JPk/xxx_1518606718.gz |gunzip
  
  [framstag@fex] phoon.png xplanet.png
  xxx 1518607608
  wget -qO- https://fex.rus.uni-stuttgart.de/fop/Jmh78NPx/xxx_1518607608.tgz |tar xvzf -

Full usage:

file upload:       xxx [-m LIMIT] [-k DAYS] [-z] FILE...
pipe upload: ... | xxx [-m LIMIT] [-k DAYS] 
download:          xxx [-m LIMIT] [-o] [-|NUMBER]
other:             xxx [-l] [-u] [-x]
options:
  -k  keep DAYS (default: 1 day)
  -m  limit throughput (kB/s)
  -z  force compression
  -o  overwrite existing files
  -l  list
  -   download last upload (overwrite mode)

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


framstag@rus.uni-stuttgart.de