Gnut Manual: Basic Usage |
3. Basic Usage
3.1 Building Gnut
If you are not using one of the available precompile versions, you need to build Gnut from the source code. Gnut uses a standard Gnu automake/autoconf build system. First untar your distribution, cd into the directory, then do the standard:
./configure make make install
This will build gnut and install it into your default installation path.
3.2 Starting Gnut
How hard can that be, simply type gnut!
[josh@zaphod gnut]$ gnut num_columns=78 num_rows=34 131.151.189.18 gnut version 0.3.29 at your service Bound to port: 5635 gnut>
You're started, now all you have to do is enter at least one other servant's IP address. Once you have one address, gnut will find others and do its best to keep you always connected to the gnutella network. So, you'll need an IP address, a good place to look is at the Gnutella Portal, there are usually several hosts listed on the first page. Find an IP to try, then use the open command to pull it up, then use the update command to request more IP addresses.
gnut> open 216.231.59.208:8080 gnut> update
If you want to see the status of all the network connections that gnut has open at any time, you can use the info command.
gnut> info HOST STATS: Hosts: 19 Files: 2.72K Size: 9.145G NET STATS: Msg Received: 20 Msg Sent: 1 Bytes Rcvd: 740 Bytes Sent: 23 QUERY STATS: Queries: 0 Responses Sent: 0 SHARE STATS: Num Shared: 0 Size Shared: 0 CONNECTION STATS: ----------------- 1)198.109.221.88:6346 Packs: 0:0 0:0 Bytes: 0:0 TID: 7171 Type: OUT State: CONN Rate: 0:0 /sec
HOST_STATS
Shows information about the gnutellaNet (or rather, the parts of the gnutellaNet that are known to you).
NET_STATS
Shows info about the infomration you send and receive over the gnutellaNet.
SHARE_STATS
Self-explaining.
CONNECTION_STATS
Reveals the hosts you are currently connected to, whether these connections are incoming or outgoing and at what speed they run at.
3.3 Sharing
If you're running gnutella, it's probably because you want to help share some files with your fellow neighbor. Sharing files is easy in gnut, all you have to do is either put them all in one directory, or make the appropriate symlinks (if on a Unix platform). Then you use the share and scan commands to share your files.
gnut> share /home/mp3:/home/movies gnut> scan Scanned 386 files and 3649352 Kbytes. gnut>
And now all your hot files can be downloaded by anyone around the world.
3.4 Searching
Searching is just as easy as sharing was. In gnut, you use the find command. It takes one argument, which is the search keyword you are looking for. It waits for you to press a key as search results come in. The results don't stop coming in when you press the key, you just lose feedback of it.
gnut> find grateful dead Searching the gnutella network for: grateful dead Press any key to continue 63 results received.
At any time you want, hit a key to end the search. You are then presented with a sorted list of the files which matched your query.
1)Grateful Dead - Knockin' on Heaven's Door - Live Version.mp3 24.11.42.228:6346 size:11.865M ref: 62 speed: 500 2)Grateful Dead - Touch of Gray (live) 9-27-72.mp3 24.11.42.228:6346 size:10.977M ref: 61 speed: 500 etc... ---more---
Let's say that you really wanted the "Touch of Gray" track. What you would first do is hit "q" to stop displaying results, then you would use the get command to grab the file, then the info t command to display the results of the ongoing transfer.
gnut> get 2 gnut> Download of Grateful Dead - Touch of Gray (live) 9-27-72.mp3 started.
(NOTE: The file is given the extension ".gnut" until it has been completely downloaded. This way you can easily recognize incomplete files.)
gnut> info t TRANSFER_STATS: --------------- 1) 139.142.84.183:6346 2.3% 3.41K/39.054M 3.41K/sec ETA 2h10h34m TID: 15369 IN State: UP Name: Grateful Dead - Touch of Gray (live) 9-27-72.mp3 TOTALS: Rate 0:3.41K /sec gnut> Download of Grateful Dead - Touch of Gray (live) 9-27-72.mp3 succeeded.
And now you have the classic bootleg track in your current working directory. Crazy huh?