Not long ago, we wrote a guide to a file sharing utility called Transfer.sh, a free Web service that allows you to share files easily and quickly over the Internet, and PSiTransfer, a simple open source hosted file sharing solution. Today, we’ll look at another file-sharing utility called “iWant.” It is a command line based free open source decentralized point-to-point file sharing application.

How is it different from other file-sharing applications, you may be wondering? Here are some of the salient features of iWant.

  • It is a command line application. This means you don’t need to consume memory to load GUI utilities. All you need is a terminal.
  • It’s decentralized. This means that your data is not stored in any central location. Therefore, there is no failure because the central point fails.
  • IWant allows you to interrupt the download, which you can resume at any time later. You don’t have to start the download from scratch, it picks up where you left off.
  • Any changes (such as deletions, additions, and modifications) to files in the shared directory are immediately reflected on the network.
  • Like a seed, iWant downloads files from multiple nodes. If any node leaves the group or fails to respond, it continues to download from another node.
  • It is cross-platform, so you can use it in GNU/Linux, MS Windows, or Mac OS X.

Install iWant

IWant can be easily installed using the PIP package manager. Make sure you have PIP installed in your Linux distribution. If it is not installed, refer to the following guide.

How do I manage Python packages using Pip

After installing PIP, make sure you have the following dependencies:

  • libffi-dev
  • libssl-dev

For example, on Ubuntu, you can install these dependencies using the following command:

$ sudo apt-get install libffi-dev libssl-dev
Copy the code

After installing all dependencies, use the following command to install iWant:

$ sudo pip install iwant
Copy the code

Now that we have iWant on our system, let’s see how you can use it to transfer files over the network.

usage

First, start the iWant server with the following command:

(LCTT is called iWant, but the command is called iwanto, and the software hasn’t been updated in at least a year.)

$ iwanto start
Copy the code

When you first start up, iWant asks you where you want to share and download folders, so you need to enter the locations of both folders. Then, select the network card you want to use.

Example output:

Shared/Download folder details looks empty.. Note: Shared and Download folder cannot be the same SHARED FOLDER(absolute path):/home/sk/myshare DOWNLOAD FOLDER(absolute Lo => 127.0.0.1 2. Enp0s3 => 192.168.43.2 Enter index of the Interface :2 now scanning /home/sk/myshare [Adding] /home/sk/myshare 0.0 Updating Leader 56F6D5E8-654E-11e7-93C8-08002712F8C1 [Adding] /home/sk/myShare 0.0 connecting to 192.168.43.2:1235for hashdump
Copy the code

If you see output similar to the one above, you can start using iWant immediately.

Also, start the iWant service on all systems in your network, specify the locations of valid share and download folders, and select the appropriate network card.

The iWant service will continue to run in the current terminal window until you press CTRL+C to exit. You need to open a new TAB or a new terminal window to use iWant.

The usage of iWant is very simple, with few commands, as shown below.

  • iwanto start– Start the iWant service.
  • iwanto search <name>– Search for files.
  • iwanto download <hash>– Download a file.
  • iwanto share <path>– Change the location of the shared folder.
  • iwanto download to <destination>– Change the location of the download folder.
  • iwanto view config– View shared and download folders.
  • Iwanto version– The iWant version is displayed.
  • iwanto -h– Displays the help information.

Let me show you some examples.

Find files

To find a file, run:

$ iwanto search <filename>

Copy the code

Note that you do not need to specify an exact name.

Example:

$ iwanto search command
Copy the code

The command above will search for all files that contain the “command” string.

My Ubuntu system will output:

Filename Size Checksum ------------------------------------------- ------- -------------------------------- / home/sk/myshare/THE LINUX COMMAND LINE, 3.85757 efded6cc6f34a3d107c67c2300459911 PDFCopy the code

The download file

You can download files from any system on your network. To download the file, simply provide the hash (checksum) of the file, as shown below. You can use the iwanto search command to get the shared hash value.

$ iwanto download efded6cc6f34a3d107c67c2300459911
Copy the code

The files will be saved at your download location, which in this case is the /home/sk/mydownloads/ location.

Filename: /home/sk/mydownloads/THE LINUX COMMAND line. PDF Size: 3.857569 MBCopy the code

Check the configuration

To see configurations, such as the location of shared and downloaded folders, run:

$ iwanto view config
Copy the code

Example output:

Shared folder:/home/sk/myshare
Download folder:/home/sk/mydownloads
Copy the code

Change the location of shared and downloaded folders

You can change the shared folder and download folder.

$ iwanto share /home/sk/ostechnix
Copy the code

The shared location has now been changed to /home/sk/ostechnix.

Again, you can change the download location using the following command:

$ iwanto download to /home/sk/Downloads
Copy the code

To see the changes you have made, run the command:

$ iwanto view config
Copy the code

Stop iWant

Once you stop using iWant, press CTRL+C to quit.

If it doesn’t work, it’s probably because your firewall or your router doesn’t support multicast. You can view all logs in the ~/.iwant/.iwant. Log file. For more details, see the GitHub page for the project provided at the end.

That’s pretty much it. Hopefully this tool will help. I’ll be back next time with another interesting guide.

Cheers!

resources

-iWant GitHub


Via: www.ostechnix.com/iwant-decen…

SK Selected by Lujun9972

This article is originally compiled by LCTT and released in Linux China