F*EX use case: fex yourself

fex yourself with fexsend

fexsend has a feature "fex yourself more easily"

If you use a "." as the recipient address the file is sent to yourself and the download URL is shown.


  framstag@fex: fexsend some.thing .
  Server/User: http://fex.belwue.de/framstag@rus.uni-stuttgart.de
  Recipient: framstag@rus.uni-stuttgart.de
  some.thing : 18304 kB in 2 s (9152 kB/s)
  Location: http://fex.belwue.de/fop/7Hxt1t8J/some.thing

So, you can download the file by simply copy&pasting the URL, for example with wget.
You can also send this URL to a mailing list, because for this special case autodeletion and download restrictions are off by default.

But what if you cannot use your mouse, for example if you have a text console without GUI or you must provide the download link by telephone?
Then a more easier URL is desirable! Do it with // as pseudo-recipient!

  framstag@flupp: fexsend zz.tar //
  Server/User: http://fex.belwue.de/framstag@rus.uni-stuttgart.de
  zz.tar : 8906 kB in 1 s (8906 kB/s)
  Location: http://fex.belwue.de/fop/3c1WzS4X/zz.tar
  Location: http://fex.belwue.de//zz.tar
Look at the last line!

Background: I have VMs with NAT, but without GUI, therefore no cut+paste, no NFS, no ssh, no sendfile and fexsend is not configured. Nevertheless I want "quick&dirty" file transfer to this VM. Typing a regular F*EX download URL is inconvenient.

But http://fex.belwue.de//zz.tar is much easier to handle, even tellable via a phone call.

You may also use the pseudo recipients "." and "//" with the web interface.

fex yourself with fexpack

To send more than just one single file and preserve file attributes like time stamps and permission bits, you can use the fexsend addon fexpack.


  framstag@flupp: fexpack *png
  archive name: png
  png.tar: 889 kB in 1 s = 889 kB/s          
  Recipient: http://fex.belwue.de/framstag@rus.uni-stuttgart.de
  wget -qO - $FOP | tar -xv -f -

You can copy&paste the last 2 lines to any account on any UNIX system.
It will extract there your files with all file attributes.

fexpack can pack directory trees, too.

But fexpack can do even more! It can provide you with an upload function:

  framstag@flupp: fexpack -u
  # get upload variable (valid for one day) and upload function:
  eval $(curl -s http://fex.belwue.de/fup?ukey=_ZYXcFssZ)
Copy&paste this last line into a bash on any account on any UNIX system and you will have there a F*EX upload function fup without the need to install any software!

  root@obertux:/var/log# eval $(curl -s http://fex.belwue.de/fup?ukey=_L8XpEkjO)
  usage: fup FILE...
  root@obertux:/var/log# fup syslog*
  archive name: syslog
  fup_syslog.tar (13 MB) received and saved

Explanation: the curl command gets the upload variable and upload function from the fexserver and the eval command makes it available for your bash.
See output of curl without eval:

  root@obertux:/var/log# curl -s http://fex.belwue.de/fup?ukey=_L8XpEkjO
  fup() {
    a=$(basename "$1");
    test -r "$1" || { echo "usage: fup FILE...";return; };
    test -z "$2" || { echo -n "archive name: ";read a; };
    tar cvf "$t" "$@" &&
    curl -F "keep=1" -F "comment=[$(id -nu)@$(hostname)]" -F "file=@$t" $FUP|cat;
    rm "$t";
  }; fup

To install fexsend and fexpack, use:

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

But wait, there is still more! → Internet clipboard