Debian Codegraph @

doc/xx

raw
1 With xx you have a network wide shell based clip board for files and
2 STDIN/STDOUT: easy data exchange between different accounts on different
3 hosts.
4
5 usage: send file(s): xx file...
6 or: send STDIN: xx -
7 or: send pipe: ... | xx
8 or: get file(s) or STDIN: xx
9 or: get file(s) quickly: xx --
10
11
12 Pipe example:
13
14 framstag@tandem:~: uname -a | xx
15 /home/framstag/.fex/tmp/STDFEX : 0 kB in 1 s (0 kB/s)
16
17
18 framstag@fex:~: xx
19 transfered: 0 MB (100%)
20 Linux tandem 2.6.24-28-server #1 SMP Wed Aug 18 22:01:20 UTC 2010 i686 GNU/Linux
21
22
23 File transfer example:
24
25 framstag@tandem:~: xx /boot/
26 making tar transfer file /home/framstag/.fex/tmp/STDFEX :
27 /boot/
28 /boot/initrd.img-2.6.24-27-generic
29 /boot/vmlinuz-2.6.24-28-generic
30 (...)
31 /boot/System.map-2.6.24-27-generic
32 /home/framstag/.fex/tmp/STDFEX : 34 MB in 2 s (17605 kB/s)
33
34
35 framstag@fex:/tmp: xx
36 transfered: 34 MB (100%)
37 Files in transfer-container:
38
39 drwxr-xr-x root/root 0 2010-10-20 07:37 boot/
40 -rw-r--r-- root/root 7905085 2010-05-25 15:38 boot/initrd.img-2.6.24-27-generic
41 -rw-r--r-- root/root 1927544 2010-10-16 20:38 boot/vmlinuz-2.6.24-28-generic
42 (...)
43 -rw-r--r-- root/root 906803 2010-03-24 14:33 boot/System.map-2.6.24-27-generic
44
45 Extract these files?
46
47
48 One problem are shared system accounts like root where different persons
49 use them: xx (like fexsend and fexget) uses $HOME/.fex/id which contains
50 personal data.
51
52 But you can put the ID authorization in the environment variable FEXID.
53
54 fexsend on your local account gives you a string for "cut and paste", example:
55
56 framstag@moep:~: fexsend -I
57 export FEXID='fex.rus.uni-stuttgart.de:8080 framstag jmBhf9ht'
58 history -d $(history 1);history -d $(history 1)
59
60 You then copy these two lines with your mouse into the root account:
61
62 root@tandem:~# export FEXID'=fex.rus.uni-stuttgart.de:8080 framstag jmBhf9ht'
63 root@tandem:~# history -d $(history 1);history -d $(history 1)
64
65 (The second line deletes these two lines from the bash history)
66
67 Now you can use xx (or fexsend and fexget) as normal. Example:
68
69 root@tandem:~# grep sshd /var/log/daemon | xx
70 transfered: 265 kB in 1 s (265 kB/s)
71
72 framstag@moep:~: xx | wc -l
73 434279
74
75
76 After logging out from root@tandem the F*EX authorization data has gone.
77
78
79 Internal details:
80
81 The intermediate transfer file container is $HOME/.fex/tmp/STDFEX
82
83 When transfering files tar/gzip format is used, whereas STDIN (pipe) will
84 be transfered uncompressed. Tip: If you want to transfer files uncompress,
85 then use: tar cvf - your files... | xx
86
87 With default usage only one "storage slot" is available: STDFEX
88 But you can use as many "storage slots" as you want by using "xx :TAG"
89 Examples:
90
91 uname -a | xx
92
93 grep sshd /var/log/daemon | xx :log
94
95 xx :log | grep obertux
96
97 xx :config /boot /etc /root
98
99 xx :config --