F*EX use case: push & pull

With fexpush for Unix you can use your F*EX account for file archiving and spreading with versioning (sharing).

First, you have to download and install the F*EX clients:

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

Then initialize fexsend (if not already done). Example:

framstag@tux:~: fexsend -I
F*EX server URL: fex.rus.uni-stuttgart.de
proxy address (hostname:port or empty if none):
Your email address as registered at fex.rus.uni-stuttgart.de: framstag@rus.uni-stuttgart.de
Your auth-ID for framstag@rus.uni-stuttgart.de at fex.rus.uni-stuttgart.de: JFD7gDd
data written to /home/framstag/.fex/id
This saves your authorization data in $HOME/.fex/id

Test it with:

framstag@tux:~: fexsend /etc/profile .
This sends /etc/profile to yourself.

Now you can use fexpush to store any files or directories on your F*EX server in the default share "_"
Example:

framstag@tux:~: fexpush /usr/local/bin
fexpush: _:bin:20170108_201340
Making fex archive (bin_20170108_201340.tgz):
Archive size: 2 MB
bin/
bin/sysinfo
bin/showmessage
bin/hibernate
bin/usbmount
bin_20170108_201340.tgz: 2 MB in 0 s = 5258 kB/s
Every fexpush archive gets an date_time version string added (here: 20170108_201340).
This means you can fexpush the same file/directory later again, but it will be stored with a new version string, if there are changes.

To see a list of your pushed archives, use fexpull -l
Example:

framstag@tux:~: fexpull
number     size share:archive:version
-------------------------------------
  1)       2 MB _:bin:20170108_201340
  2)       0 MB _:fex:20170110_005940
  3)      18 MB _:sw:20170109_140626
  4)      19 MB _:sw:20170110_133231

On any other account or host you can retrieve these files with fexpull.
If you omit the version, fexpull pulls automatically the latest version.
Example:

framstag@moep:/tmp: fexpull bin
fexpull: _:bin:20170108_201340
extract? [Yn]
checking storage... 3 MB ok!
bin_20170108_201340.tgz: 2 MB in 0 s (29523 kB/s)
bin/sysinfo
bin/showmessage
bin/hibernate
bin/usbmount

Of course you need there also the F*EX clients and your F*EX authorization data.
You can fex it all together to yourself with fex my:

framstag@moep:~: fex my
Making fex archive (fex.tgz):
Archive size: 0 MB
.fex/id
bin/fex
bin/fexsend
bin/fexget
bin/fexpush
bin/fexpull
bin/afex
bin/asex
bin/sexsend
bin/sexget
bin/sexxx
bin/xx
bin/xxx
fex.tgz: 54 kB in 0 s = 247 kB/s
Recipient: framstag@rus.uni-stuttgart.de (autodelete=no,keep=5,locale=english)
Location: https://fex.rus.uni-stuttgart.de/fop/abWx67ru1/fex.tgz
To see the URLs of your pushed archives, use:
framstag@tux:~: fexpull -u
http://fex.rus.uni-stuttgart.de/fop/56gj9cz0/bin_20170108_201340.tgz
http://fex.rus.uni-stuttgart.de/fop/jYAHkZAE/linuxclone_20170103_191122.tgz
http://fex.rus.uni-stuttgart.de/fop/pYsz3YGA/sw_20170109_140626.tgz
http://fex.rus.uni-stuttgart.de/fop/I8ES3yya/sw_20170110_133231.tgz

You can distribute these URLs wherever you want.

fexpull will not overwrite files which are newer.

When you call fexpull with the full archivename (with version) it creates an extraction directory with that name, so you can pull archives of different versions.
Example:

framstag@juhu:~: fexpull sw:20170109_140626
framstag@juhu:~: fexpull sw:20170110_133231

STDIN/STDOUT

You can also fexpush STDOUT and fexpull STDIN:
framstag@juhu:~: uname -a | fexpush
_IO_20170115_013147.gz: 0 kB in 0 s = 3 kB/s
framstag@tux:~: fexpull | cat
_IO_20170115_013147
Linux juhu 4.4.0-59-generic #80-Ubuntu SMP Fri Jan 6 17:47:47 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Clipboard xxx

An extension to fexpush/fexpull is the internet clipboard program xxx.

You can store any data of any size with xxx: files, directories or even STDOUT/STDIN pipe data.

root@obertux:~# dmesg | xxx
__20170816_105843.gz: 19 kB in 0 s = 76 kB/s
framstag@fex:/tmp: xxx mp3
Making fex archive (__20170806_115544.tgz):
Archive size: 6 MB
mp3/
mp3/CCS:Shakin all over.mp3
mp3/swr1.mp3
__20170806_115544.tgz: 6 MB in 1 s = 7822 kB/s
(xxx uses the F*EX default archive "_" in your personal share "_" → __$VERSION.tgz)

You can access these xxx archives from anywhere in the internet, from any account on any host.

framstag@fex:/tmp: xxx -l
number   upload time            size [uploader] arguments
---------------------------------------------------------
  1) 2017-08-01 18:57:36        2 MB [framstag@moep] phoon.png xplanet.png
  2) 2017-08-02 14:59:33      313 MB [framstag@moep] Downloads
  3) 2017-08-03 13:13:01       15 MB [framstag@tandem] Bicycle_Repairman.avi
  4) 2017-08-06 12:26:16        0 MB [framstag@fex] <STDINOUT>
  5) 2017-08-06 12:26:30        3 MB [tux@xerus] <STDINOUT>
  6) 2017-08-06 12:40:05        4 MB [root@obertux] <STDINOUT>
  7) 2017-08-06 13:55:46        6 MB [framstag@fex] mp3

framstag@fex:/tmp: xxx 3
20170806_212024 15 MB "[framstag@tandem] Bicycle_Repairman.avi"
pull? [Yn]
fexpull: _:_:20170806_212024 "[framstag@tandem] Bicycle_Repairman.avi"
Bicycle_Repairman.avi

framstag@fex:/tmp: xxx -u
https://fex.rus.uni-stuttgart.de/fop/1a1h792x/__20170801_182115.tgz "[framstag@moep] phoon.png xplanet.png"
https://fex.rus.uni-stuttgart.de/fop/ngfr65eh/__20170802_124295.tgz "[framstag@moep] Downloads"
https://fex.rus.uni-stuttgart.de/fop/m88jh6x5/__20170806_212024.tgz "[framstag@tandem] Bicycle_Repairman.avi"
https://fex.rus.uni-stuttgart.de/fop/mhgb6767/__20170822_134610.gz  "[framstag@fex] <STDINOUT>"
https://fex.rus.uni-stuttgart.de/fop/mnhg6rex/__20170807_084838.tgz "[tux@xerus] <STDINOUT>"
https://fex.rus.uni-stuttgart.de/fop/lo9dcw3n/__20170816_105843.gz  "[root@obertux] <STDINOUT>"
https://fex.rus.uni-stuttgart.de/fop/mjgb654x/__20170818_184358.tgz "[framstag@fex] mp3"

xxx (20170825): push/pull data to/from your F*EX default share archive
see also: fexpush, fexpull
 
usage: xxx [-l] [-u] [-o]
usage: xxx FILE(s)
usage: xxx [NUMBER]
usage: xxx -d NUMBER(s)
usage: xxx -d 'REGEXP'
usage: xxx -D [DAYS]
usage: ... | xxx
usage: xxx [NUMBER] | ...
options: 
  -l  list available archives
  -u  show download URLs
  -d  delete archive(s)
  -D  delete all archives older than DAYS
  -o  delete all archives but one (keep latest)
arguments: 
  NUMBER      select archive with NUMBER
  REGEXP      select archive with REGular EXPression uploader or arguments
  FILE        push FILE(s)
examples:
  xxx *png    # push *png files
  lshw | xxx  # push hardware list
  xxx -l      # list archives
  xxx         # pull last archive
  xxx 3       # pull archive number 3
  xxx -d test # delete all "test" archives
  xxx -D 2    # delete all archives older than 2 days

Sharing

You can also use fexpush for archive sharing with other users.

In this case you use an other share than the default share "_" which is reserved for your personal usage.


framstag@rus.uni-stuttgart.de