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 and NAT.

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

Note: xx does always compress (using gzip)!


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
    #4 [framstag@moep] Da-Bach-Na-Fahrt.mp4
    #3 [framstag@moep] -
    #2 [tux@obertux] -
    #1 [tux@obertux] phoon.png xplanet.png
  get number: 1
  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.

  framstag@moep:/tmp: xxx -l
  
  [framstag@fex] - (1 MB, 1 d)
  https://fex.rus.uni-stuttgart.de/fop/uXxK4JPk/xxx_1518606718.gz
  
  [framstag@fex] phoon.png xplanet.png (2 MB, 1 d)
  https://fex.rus.uni-stuttgart.de/fop/Jmh78NPx/xxx_1518607608.tgz

Full usage:

xxx: internet clipboard with versioning
file upload:       xxx [-m LIMIT] [-k DAYS] [-w] [-q] [-p] [-z] [-Z] FILE...
pipe upload: ... | xxx [-m LIMIT] [-k DAYS] [-w] [-q] [-t] [COMMENT]
download:          xxx [-m LIMIT] [-o] [DATE_TIME|URL|-]
delete:            xxx -d [DATE_TIME|URL|REGEXP|-]
other:             xxx [-l] [-w] [-u] [-x] [-X] [-k DAYS DATE_TIME|URL]
options:
  -m  limit throughput (kB/s)
  -k  keep DAYS (default: 1 day)
  -w  show wget download command
  -q  quiet mode: no transfer status info
  -p  add path for single file argument
  -z  force compression
  -0  force no compression
  -Z  use zip
  -T  use tar (default for UNIX)
  -t  text mode (URL content displayble by webbrowser)
  -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
upload arguments:
  .* files are default excluded, to include use .FILE or ./DIRECTORY
download or delete argument:
  -  last upload (in overwrite mode for download)
examples:
  xxx *jpg           # upload all jpg files
  xxx -m 1000 -k 5 . # upload current directory with 1000 kB/s and keep 5 days
  ls -l | xxx -t     # upload directory listing in text format
  xxx -d -           # delete last upload
  xxx                # interactive usage: download, list, delete
see also: fexsend, fexget, fexpack, fexstore, fexsync

xxx -u gives you shell code for copy&paste for another user 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! And with Cygwin on Windows, too!


To install the F*EX clients see the FAQ.