⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 userguide.html

📁 P2P NAP的C实现 P2P在网络应用中越来越流行
💻 HTML
📖 第 1 页 / 共 5 页
字号:
your <code>terminfo</code> database is located at<code>/usr/share/lib/terminfo</code>. If it is in a differentlocation, you must set the <code>TERMINFO</code> environment variableto the location, e.g.<p><pre>   export TERMINFO=/usr/share/terminfo</pre><h4><a name=3.8.></a>3.8. Other formats</h4>Nap may be available in other formats, for instance in precompiledform for other operating systems. Something similar to the aboveinstructions should work.<h4><a name=3.9.></a>3.9. "What if I don't have root privileges on my machine?"</h4>Don't worry. It is not really necessary to install nap in<code>/usr/local/bin</code>; you can install it anywhere you like.All that is really necessary is that the <code>nap</code> binary issomewhere in your <code>PATH</code>. The recommended steps are asfollows:<p>1. create a directory <code>bin</code> in your home directory, andmove the file <code>nap</code> there.<p><pre>        mkdir $HOME/bin	mv nap $HOME/bin</pre>2. If the shell you are using is <code>sh</code> or <code>bash</code>,put the following lines in the file <code>.bashrc</code> in your homedirectory:<p><pre>        PATH=$PATH:$HOME/bin	export PATH</pre>If the shell you are using is <code>tcsh</code>, put the followingline in the file <code>.tcshrc</code> in your home directory:<p><pre>        setenv PATH ${PATH}:$HOME/bin</pre>3. Restart the shell. You should now be able to invoke nap by typing<code>nap</code>.<!----------------------------------------------------------------------><h2><a name=4.></a>4. Basic nap usage</h2>This section gives a brief overview of the most important features ofnap, particulary how to search and download files, and how to navigatenap's three screens. This should be enough to get you started. Latersections of this userguide will cover these and other features in moredetail.<h4><a name=4.1.></a>4.1 Starting nap</h4>Congratulations, you have installed nap, and you are ready to give ita try. Simply invoke nap by typing<p><pre>        nap</pre>You will be prompted for any necessary information, and you will beasked whether you want to save the information in a configurationfile. It is a good idea to answer yes [y]. Eventually you will seenap's main screen, which looks more or less like this:<p><table><tr><td bgcolor=#000000><pre><font color=#8080ff>                                                                  [nap v1.5.2] <font color=#ffffff>     _.-------._    |\          /|   /| \_.----._/ |\                                  __  .$:            :$.    _____  ____   _____  _____  / /__ ___   ____ |$$:  ___  ___  :$$|  / __  // _  `// _   //  ___//  __// _ \ / ___/  "$: \___\/___/ :$"  / / / // /_/ // /_/ /(__   )/  /_ /  __// /    |     __     |   /_/ /_/ \__,_// ____//_____/ \___/ \___//_/mG!    `.    \/    .'                /_/      `. .__, .'        `----'<font color=#ffff00>* This is the main screen of nap.** In this space, you will usually see some welcome messages from your * Napster server.** In the upper right corner, you see the version number of nap.* The blue line below is called the status line.* It displays the user name, and some other information. In the right part* of the status line, you see the number of current uploads, downloads,* and queued downloads.<font color=#8080ff> [username] [474042 songs in 8066 libraries (1954 gigs)]         [U/0 D/0 Q/0] </pre></td></tr></table><p>The very last line, after the status line, has a cursor. This is whereyou can enter commands. All commands start with a slash "/"; if youforget the slash, nap will complain that you are "not on a channel".But more about that later.<h4><a name=4.2.></a>4.2. Simple searches and downloads</h4>To perform a search, you use the <code>/search</code> command. Forinstance, if you want to search for a song called "Yucky green goo", you type<p><pre>        /search yucky</pre>This will cause nap to search for files that contain the word"Yucky". Napster queries are case insensitive, so it doesn't matter ifyou search for "yucky" or "Yucky". If fact, napster is generally verytolerant regarding search queries.<p>After a few moments, another screen will pop up with the searchresults. This is called the result screen. It might look as follows:<p><table><tr><td bgcolor=#000000><pre><font color=#ffffff>Filename (total = 14)                    | BRate       | Length       | Conn-----------------------------------------|-------------|--------------|---------<font color=#8080ff>1) Bobby Bones - Yucky.mp3               | 64          | 3:24         | T3<font color=#ffffff>2) HOT 5- [07]Time Will Tell.mp3         | 128         | 2:12         | T3  3) WB theme songs - Jack and Jill .mp3   | 128         | 3:00         | Cable4) Korean Rap-YG family - 1tym attack.mp | 128         | 3:35         | 56k5) Felicity THEME season 3 (New version  | 128         | 0:53         | 56k6) Passions theme.mp3                    | 128         | 2:24         | 33.67) Korean - Uptown(03)- Han Oh Baek Nyun | 128         | 4:25         | 28.88) BB Mack  - Back Here.mp3              | 192         | 3:40         | 28.89) Cher_with_Peter_Cetera-After_All.mp3  | 128         | 4:04         | 28.810) Gob- Paint it Black.mp3              | 160         | 1:49         | 28.811) 3lw (Three Little Women) - NO MORE3. | 192         | 4:26         | 28.812) kpop-CLICK B-EXIT.mp3                | 128         | 4:21         | 14.413) Duets - Gwyneth Paltrow & Huey Le wi | 192         | 4:51         | 14.414) Dawson's Creek 2 Soundtrack - Shawn  | 128         | 4:38         | Unknown                                         |             |              |                                         |             |              |                                         |             |              |                                         |             |              |                                         |             |              |                                         |             |              |                                         |             |              |<font color=#ff0000>1:\1\Mp3\Bobby Bones - Yucky.mp3</pre></td></tr></table><p>Note that not all files listed actually contain the word "yucky". Forinstance, some of them might be found in a directory named "yucky",but the directory name is not displayed in the results list.<p>The files are listed in decreasing order of connection speed (or, ifavailable, in increasing order of ping response). On the resultscreen, you can move up and down with the respective arrow keys, oryou can move faster with the "PgUp" and "PgDn" keys. The red line atthe bottom displays the full filename of the song currently selected;if it does not fit on the screen, you can scroll it from side to sidewith the left and right arrow keys. If you press "h", a help messageis displayed at the bottom of the screen, which can also be scrolledvia the left and right arrow keys.<p>You can hit "return" for any song you wish to download. Note: do notuse nap to download or distribute any copyrighted material.<h4><a name=4.3.></a>4.3. The download/upload screen</h4>If you press "tab" while viewing search results, you will be taken to athird screen which displays all current downloads and uploads in asplit-screen format (downloads above, uploads below), and theirprogress. Typically, this screen might look as follows:<p><table><tr><td bgcolor=#000000><pre><font color=#8080ff>                                 Downloads (7)</font><font color=#ffffff> 1. Bobby Bones - Yucky.mp3                    | user77     | *Complete* 2. Leo the Lion - Roaring On.mp3              | nickomat   | 55% (27.50 k/s) 3. Savage Girls - Dig Your Well.ogg           | nickomat   | Queued 4. Savage Girls - Gallow Song.ogg             | nickomat   | Waiting 5. Savage Girls - Ghostly Night.ogg           | nickomat   | Waiting 6. The Yucky Family - My Brother.mp3          | superguy   | Connecting 7. Knots and Bones - Knotted.mp3              | 5668hello  | Failed<font color=#8080ff>                                  Uploads (5)</font> 1. Cloned Sheep - Baah.mp3                    | macky      | 13% (0.53 k/s) 2. Fried Thunder - Yesterday Morning.ogg      | sonicman   | Interrupted 3. Fried Thunder - The Angel.ogg              | sonicman   | *Complete* 4. Sunny Days - Happy again.mp3               | sonicman   | 77% (18.40 k/s) 5. Sunny Days - Me and the sun.mp3            | sonicman   | 94% (22.53 k/s)<font color=#ff0000>Use F1 or 'q' to return to the main screen. 'h' for help.</font></pre></td></tr></table><p>You can scroll through the tasks via the up and down arrowkeys, or "PgUp" and "PgDn". You can switch between the download andupload sections by pressing 'o', or "Alt-up" and "Alt-down". There area number of keystrokes available to manipulate the displayed tasks:'d' to delete the task under the cursor, 'r' to retry afailed/incomplete download, 'R' to retry all failed tasks, 'f' toforce an immediate download, and 'P' to purge stopped tasks from thecurrent section. You can also type 'h' for help and left/right toscroll help, as on the results screen.<p>Press "tab" to go back to search results, or type "q" from eitherscreen to return to the main screen. You can also switch between thethree screens (main screen, search result screen, download/uploadscreen) by using the function keys "F1" thru "F3", or "Alt-1" thru"Alt-3".  <h4><a name=4.4.></a>4.4. Browsing another user's files</h4>Browsing works almost exactly like searching. Just type<p><pre>        /browse <i>user</i></pre>and that user's files will appear on the result screen. If the remoteuser's client supports it, you can also directly browse that user'sfiles, without going via the napster server. To do this, use thecommand <code>/browse2</code> instead of <code>/browse</code>. Thiscan be useful if the server limits the number of browse results thatyou can see. See also <a href=#5.9.>5.9. Direct browsing</a>.<h4><a name=4.5.></a>4.5. Where your music files go</h4>When you start nap for the first time, it prompts you to enter threedirectories: Your "upload", "download" and "incomplete" directories. <p>The "upload" directory contains files that you want to share. Do notuse nap to share any copyrighted material.  Files that are currentlybeing downloaded are kept in the "incomplete" directory. Completeddownloads are moved to the "download" directory. <p>You can specify the location of these directories on the command line,in the configuration file, or when nap prompts you for thisinformation. If you do not specify a download directory, nap will usethe current working directory. If you do not specify an incompletedirectory, nap will use the download directory. If you do not specifyan upload directory, nap will be unable to share any files. It ispossible to specify more than one upload directories; multipledirectories are separated by semicolons.<p>If an incomplete download results in a file of 100000 bytes or less,the file will be considered a "turd" and removed. Larger incompletefiles will be kept in the "incomplete" directory. You can change thisbehavior; see <a href=#5.5.>5.5. Incompete downloads and turds</a>.<h4><a name=4.6.></a>4.6. Navigating the main screen</h4>The text of the main screen can be scrolled up and down by using the"PgUp" and "PgDn" keys. This allows you to see stuff that hasdisappeared off the top of the screen. If you prefer, you can use thealternative keybindings "Ctrl-P" and "Ctrl-N" or "Ctrl-V" for the samepurpose.<p>To switch between screens, use the keys "F1" thru "F3", or "Alt-1"thru "Alt-3". In addition, the commands <code>/results</code> and<code>/dlul</code> will take you to the search results or thedownload/upload list from the main screen.<p>You can type <code>/help</code> to see a list of availablecommands. (There are so many that you will probably have to use "PgUp"and "PgDn" to see them all). You can get usage info for a particularcommand by typing <code>/help</code> followed by the command name(without the leading slash). <p>When entering a command, a number of standard keybindings areavailable. "Ctrl-U" deletes the current line, while "Ctrl-K" truncatesthe input, and "Ctrl-W" deletes everything from the current word tothe end of the line. "Ctrl-D" or "delete" deletes the currentcharacter. "Backspace" deletes the previous character and"Alt-backspace" deletes the previous word. You can use "Ctrl-A" or"home" to move to the beginning of the line, and "Ctrl-E" or "end" tomove to the end of the current line. "Ctrl-L" refreshes thescreen. <p> The "up" and "down" keys provide a history of previously typedcommands scroll through a history list of previous commands. This cansave you time when using the same commands repeatedly. You can alsouse the "tab" key for completing partially typed commands. Forinstance, <code>/res[tab]</code> will yield <code>/results</code>.<h4><a name=4.7.></a>4.7. Quitting nap</h4>To quit nap, type <code>/quit</code>. If there are any uploads ordownloads going on, nap will refuse to quit unless you type<code>/quit yes</code>. You can also give the command<code>/tquit</code>, which will schedule the program to quit after allcurrent transfers (including queued ones) have been completed. When<code>/tquit</code> is in effect, no new uploads will be accepted, butyou can still initiate new downloads. You can undo the effect of<code>/tquit</code> with <code>/unquit</code>, in case you changeyour mind.<p>An emergency exit from nap is to press "Ctrl-C" twice in shortsuccession. Note that a single "Ctrl-C" does not usually cause nap to

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -