recv-files () {
[ $# == 0 ] && { echo "recv-files usage: recv-files"; return; }
local port=1234
tar xvf - < /dev/tcp/`hostname`/$port
}
send-files () {
[ $# == 0 ] && { echo "usage: send-files [host] [files or dirs]"; return; }
local port=1234
local host=$1
local fod="$@"
tar cvf - $fod > /dev/tcp/$host/$port
}
[ $# == 0 ] && { echo "recv-files usage: recv-files"; return; }
local port=1234
tar xvf - < /dev/tcp/`hostname`/$port
}
send-files () {
[ $# == 0 ] && { echo "usage: send-files [host] [files or dirs]"; return; }
local port=1234
local host=$1
local fod="$@"
tar cvf - $fod > /dev/tcp/$host/$port
}