This is a command line tool for transfering files from one machine to another. One of the machines serves as a Server and the others serve as Clients. The client program has a command line interface and can be used for file transfer between itself and the server machine. Following commands are allowed.
-
ls: list all the files in the current directory in the client.
-
lls: list all the files in the current directory of the server.
-
get: Download a particular file from the server.
-
put: Upload a particular file to the server.
-
mget: Download multiple files from the server.
-
mput: Upload multiple files to the server.
The program has been tested on various kind of files like .FLV, .PDF, .TXT, .MP4, .MP3.
This was a lab assignment in Computer Networks lab at my University to learn how to use sockets to transfer information from one machine to another.
To compile the program, do the following.
-
gcc ServerNew.c ServerFunc.c -o Server in a machine.
-
gcc ClientNew.c ClientFunc.c -o Client in another machine.
To run the program, do the following.
-
Run "./Server" on the command line in one machine.
-
Run "./Client hostname" on the command line in other machine. "hostname" can be ip of the server machine.