mknod
- Comando:
- mknod
- Tipo:
- cmd
- Descripcion:
- computadoras
- Plataforma:
- AIX, Solaris, Linux
Uso
How to save commands output on remote hosts in AIX?
leave a comment »
Sometimes in AIX, we need to send the output of a command (tar, mksysb, savevg, …) to other server! The following procedure will do this for us:
# mknod /tmp/pipe p # cat /tmp/pipe | ssh remote_user@remote_host “dd of=remote_file bs=1024” & # Commands like tar, mksysb, savevg, …
For Example:
# mknod /tmp/pipe p # cat /tmp/pipe | ssh remote_user@remote_host “dd of=remote_file bs=1024” & # savevg -f/tmp/pipe -vip vg_namep
# mknod /tmp/pipe p # cat /tmp/pipe | ssh remote_user@remote_host “dd of=remote_file bs=1024” & # mksysb -i /tmp/pipep
In the procedure above, the remote_file can point to any type of files, for example regular file, tape device file or etc.For example, to send mksysb command’s output to a remote tape:
# mknod /tmp/pipe p # cat /tmp/pipe | ssh remote_user@remote_host “dd of=/dev/rmt0 bs=1024” & # mksysb -i /tmp/pipe