Transfer files between UNIX machines using nc.
Simple shell script help transfer files from one machine to another remote machine. Note that this script requires BSD netcat!
This utility is handy for transferring file to machines on same / different networks.
$ transfer -Tf file -h hostname -p port
or without defining port (Defaults to 1313)
$ transfer -Tf file -h hostname
$ transfer -Rf file -p port
or without defining port (Defaults to 1313)
$ transfer -Rf file
===
$ ./transfer -v
Transfer v.1.0 by PrankyMat Feb-20-2015
transfer
is a shell executable and is ready to run out of the box.
To start, first clone this repository:
$ git clone https://github.com/prankymat/transfer.git # clone this repo
Then navigate to transfer's root directory using cd
:
$ cd transfer/
transfer
is now ready to use!
$ ./transfer -Tf file -h hostname # will transmit file to hostname through port 1313
If you wish to access transfer
in different directories,
you can move transfer
to /bin/
or ~/bin/
$ mv transfer /bin/transfer
$ mv transfer ~/bin/transfer
After moving transfer
to /bin/ or ~/bin/ you can simply invoke transfer
anywhere.
$ transfer ./transfer -Tf file -h hostname # no more annoying './' :)
You may encounter error when using ./transfer
in your bash, here are some possible solutions:
$ ./transfer
-bash: ./t: Permission denied
Add permission to execute transfer
$ chmod +x transfer
$ sudo chmod +x transfer
===
$ ./transfer -Tf file -h host
./transfer: line 95: file: Permission denied
Sudo transfer
$ sudo ./transfer -Tf file -h host
===
Please provide any feedback at the issue page of this repo. Thanks!