diff options
author | Eric Andersen <andersen@codepoet.org> | 2000-07-07 19:07:47 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2000-07-07 19:07:47 +0000 |
commit | 215809234460de93e616cffac06f641e969db673 (patch) | |
tree | 21d7f6ece71409b9d7874aca8e0b86fa7f496eed | |
parent | b9eb0233a9d257ce5311d0557ccb4432e836f088 (diff) | |
download | busybox-w32-215809234460de93e616cffac06f641e969db673.tar.gz busybox-w32-215809234460de93e616cffac06f641e969db673.tar.bz2 busybox-w32-215809234460de93e616cffac06f641e969db673.zip |
This patch finishes the cleanup of all the commands. It also cleans up
the remaining chapters -- Matt Kraai <kraai@alumni.carnegiemellon.edu>
-Erik
-rw-r--r-- | docs/busybox.sgml | 2725 |
1 files changed, 1042 insertions, 1683 deletions
diff --git a/docs/busybox.sgml b/docs/busybox.sgml index e0e023410..8d03c9d13 100644 --- a/docs/busybox.sgml +++ b/docs/busybox.sgml | |||
@@ -862,7 +862,7 @@ | |||
862 | </para> | 862 | </para> |
863 | 863 | ||
864 | <para> | 864 | <para> |
865 | Returns an exit code of FALSE (1). | 865 | Return an exit code of FALSE (1). |
866 | </para> | 866 | </para> |
867 | 867 | ||
868 | <para> | 868 | <para> |
@@ -1463,7 +1463,7 @@ | |||
1463 | </para> | 1463 | </para> |
1464 | 1464 | ||
1465 | <para> | 1465 | <para> |
1466 | Loads MODULE into the kernel. | 1466 | Load MODULE into the kernel. |
1467 | </para> | 1467 | </para> |
1468 | 1468 | ||
1469 | <para> | 1469 | <para> |
@@ -2352,1941 +2352,1300 @@ | |||
2352 | </para> | 2352 | </para> |
2353 | </sect1> | 2353 | </sect1> |
2354 | 2354 | ||
2355 | <!-- This is where I have stopped formatting stuff --> | 2355 | <sect1 id="ps"> |
2356 | <varlistentry><term><emphasis>ps | 2356 | <title>ps</title> |
2357 | |||
2358 | </emphasis></term> | ||
2359 | <listitem><para></para> | ||
2360 | |||
2361 | <para> | ||
2362 | Usage: ps | ||
2363 | |||
2364 | |||
2365 | </para> | ||
2366 | |||
2367 | <para> | ||
2368 | Report process status | ||
2369 | |||
2370 | |||
2371 | </para> | ||
2372 | |||
2373 | <para> | ||
2374 | This version of ps accepts no options. | ||
2375 | |||
2376 | |||
2377 | </para> | ||
2378 | |||
2379 | <para> | ||
2380 | Example: | ||
2381 | |||
2382 | |||
2383 | </para> | ||
2384 | |||
2385 | <para> | ||
2386 | <screen> | ||
2387 | $ ps | ||
2388 | PID Uid Gid State Command | ||
2389 | 1 root root S init | ||
2390 | 2 root root S [kflushd] | ||
2391 | 3 root root S [kupdate] | ||
2392 | 4 root root S [kpiod] | ||
2393 | 5 root root S [kswapd] | ||
2394 | 742 andersen andersen S [bash] | ||
2395 | 743 andersen andersen S -bash | ||
2396 | 745 root root S [getty] | ||
2397 | 2990 andersen andersen R ps | ||
2398 | </screen> | ||
2399 | |||
2400 | |||
2401 | </para> | ||
2402 | |||
2403 | <para> | ||
2404 | ------------------------------- | ||
2405 | |||
2406 | |||
2407 | </para> | ||
2408 | |||
2409 | </listitem></varlistentry> | ||
2410 | <varlistentry><term><emphasis>pwd | ||
2411 | |||
2412 | </emphasis></term> | ||
2413 | <listitem><para></para> | ||
2414 | |||
2415 | <para> | ||
2416 | Prints the full filename of the current working directory. | ||
2417 | |||
2418 | |||
2419 | </para> | ||
2420 | |||
2421 | <para> | ||
2422 | Example: | ||
2423 | |||
2424 | |||
2425 | </para> | ||
2426 | |||
2427 | <para> | ||
2428 | <screen> | ||
2429 | $ pwd | ||
2430 | /root | ||
2431 | </screen> | ||
2432 | |||
2433 | |||
2434 | </para> | ||
2435 | |||
2436 | <para> | ||
2437 | ------------------------------- | ||
2438 | |||
2439 | |||
2440 | </para> | ||
2441 | |||
2442 | </listitem></varlistentry> | ||
2443 | <varlistentry><term><emphasis>reboot | ||
2444 | |||
2445 | </emphasis></term> | ||
2446 | <listitem><para></para> | ||
2447 | |||
2448 | <para> | ||
2449 | Instructs the kernel to reboot the system. | ||
2450 | |||
2451 | |||
2452 | </para> | ||
2453 | |||
2454 | <para> | ||
2455 | ------------------------------- | ||
2456 | |||
2457 | |||
2458 | </para> | ||
2459 | |||
2460 | </listitem></varlistentry> | ||
2461 | <varlistentry><term><emphasis>rm | ||
2462 | |||
2463 | </emphasis></term> | ||
2464 | <listitem><para></para> | ||
2465 | |||
2466 | <para> | ||
2467 | Usage: rm [OPTION]... FILE... | ||
2468 | |||
2469 | |||
2470 | </para> | ||
2471 | |||
2472 | <para> | ||
2473 | Remove (unlink) the <literal>FILE(s).</literal> You may use '--' to | ||
2474 | indicate that all following arguments are non-options. | ||
2475 | |||
2476 | |||
2477 | </para> | ||
2478 | |||
2479 | <para> | ||
2480 | Options: | ||
2481 | |||
2482 | |||
2483 | </para> | ||
2484 | |||
2485 | <para> | ||
2486 | <screen> | ||
2487 | -f remove existing destinations, never prompt | ||
2488 | -r or -R remove the contents of directories recursively | ||
2489 | </screen> | ||
2490 | |||
2491 | |||
2492 | </para> | ||
2493 | |||
2494 | <para> | ||
2495 | Example: | ||
2496 | |||
2497 | |||
2498 | </para> | ||
2499 | |||
2500 | <para> | ||
2501 | <screen> | ||
2502 | $ rm -rf /tmp/foo | ||
2503 | </screen> | ||
2504 | |||
2505 | |||
2506 | </para> | ||
2507 | |||
2508 | <para> | ||
2509 | ------------------------------- | ||
2510 | |||
2511 | |||
2512 | </para> | ||
2513 | |||
2514 | </listitem></varlistentry> | ||
2515 | <varlistentry><term><emphasis>rmdir | ||
2516 | |||
2517 | </emphasis></term> | ||
2518 | <listitem><para></para> | ||
2519 | |||
2520 | <para> | ||
2521 | Usage: rmdir [OPTION]... DIRECTORY... | ||
2522 | |||
2523 | |||
2524 | </para> | ||
2525 | |||
2526 | <para> | ||
2527 | Remove the <literal>DIRECTORY(ies),</literal> if they are empty. | ||
2528 | |||
2529 | |||
2530 | </para> | ||
2531 | |||
2532 | <para> | ||
2533 | Example: | ||
2534 | |||
2535 | |||
2536 | </para> | ||
2537 | |||
2538 | <para> | ||
2539 | <screen> | ||
2540 | # rmdir /tmp/foo | ||
2541 | </screen> | ||
2542 | |||
2543 | |||
2544 | </para> | ||
2545 | |||
2546 | <para> | ||
2547 | ------------------------------- | ||
2548 | |||
2549 | |||
2550 | </para> | ||
2551 | |||
2552 | </listitem></varlistentry> | ||
2553 | <varlistentry><term><emphasis>rmmod | ||
2554 | |||
2555 | </emphasis></term> | ||
2556 | <listitem><para></para> | ||
2557 | |||
2558 | <para> | ||
2559 | Usage: rmmod [OPTION]... [MODULE]... | ||
2560 | |||
2561 | |||
2562 | </para> | ||
2563 | |||
2564 | <para> | ||
2565 | Unloads the specified kernel modules from the kernel. | ||
2566 | |||
2567 | |||
2568 | </para> | ||
2569 | |||
2570 | <para> | ||
2571 | Options: | ||
2572 | |||
2573 | |||
2574 | </para> | ||
2575 | |||
2576 | <para> | ||
2577 | <screen> | ||
2578 | -a Try to remove all unused kernel modules. | ||
2579 | </screen> | ||
2580 | |||
2581 | |||
2582 | </para> | ||
2583 | |||
2584 | <para> | ||
2585 | Example: | ||
2586 | |||
2587 | |||
2588 | </para> | ||
2589 | |||
2590 | <para> | ||
2591 | <screen> | ||
2592 | $ rmmod tulip | ||
2593 | </screen> | ||
2594 | |||
2595 | |||
2596 | </para> | ||
2597 | |||
2598 | <para> | ||
2599 | ------------------------------- | ||
2600 | |||
2601 | |||
2602 | </para> | ||
2603 | |||
2604 | </listitem></varlistentry> | ||
2605 | <varlistentry><term><emphasis>sed | ||
2606 | |||
2607 | </emphasis></term> | ||
2608 | <listitem><para></para> | ||
2609 | |||
2610 | <para> | ||
2611 | Usage: sed [<emphasis>-n</emphasis>] <emphasis>-e</emphasis> script [file...] | ||
2612 | |||
2613 | |||
2614 | </para> | ||
2615 | |||
2616 | <para> | ||
2617 | Allowed sed scripts come in the following form: | ||
2618 | |||
2619 | |||
2620 | </para> | ||
2621 | |||
2622 | <para> | ||
2623 | <screen> | ||
2624 | 'ADDR [!] COMMAND' | ||
2625 | </screen> | ||
2626 | |||
2627 | |||
2628 | </para> | ||
2629 | |||
2630 | <para> | ||
2631 | <screen> | ||
2632 | where address ADDR can be: | ||
2633 | NUMBER Match specified line number | ||
2634 | $ Match last line | ||
2635 | /REGEXP/ Match specified regexp | ||
2636 | (! inverts the meaning of the match) | ||
2637 | </screen> | ||
2638 | |||
2639 | |||
2640 | </para> | ||
2641 | |||
2642 | <para> | ||
2643 | <screen> | ||
2644 | and COMMAND can be: | ||
2645 | s/regexp/replacement/[igp] | ||
2646 | which attempt to match regexp against the pattern space | ||
2647 | and if successful replaces the matched portion with replacement. | ||
2648 | </screen> | ||
2649 | |||
2650 | |||
2651 | </para> | ||
2652 | |||
2653 | <para> | ||
2654 | <screen> | ||
2655 | aTEXT | ||
2656 | which appends TEXT after the pattern space | ||
2657 | </screen> | ||
2658 | |||
2659 | |||
2660 | </para> | ||
2661 | |||
2662 | <para> | ||
2663 | Options: | ||
2664 | |||
2665 | |||
2666 | </para> | ||
2667 | |||
2668 | <para> | ||
2669 | <screen> | ||
2670 | -e add the script to the commands to be executed | ||
2671 | -n suppress automatic printing of pattern space | ||
2672 | </screen> | ||
2673 | |||
2674 | |||
2675 | </para> | ||
2676 | |||
2677 | <para> | ||
2678 | This version of sed matches full regular expressions. | ||
2679 | |||
2680 | |||
2681 | </para> | ||
2682 | |||
2683 | <para> | ||
2684 | Example: | ||
2685 | |||
2686 | |||
2687 | </para> | ||
2688 | |||
2689 | <para> | ||
2690 | <screen> | ||
2691 | $ echo "foo" | sed -e 's/f[a-zA-Z]o/bar/g' | ||
2692 | bar | ||
2693 | </screen> | ||
2694 | |||
2695 | |||
2696 | </para> | ||
2697 | |||
2698 | <para> | ||
2699 | ------------------------------- | ||
2700 | |||
2701 | |||
2702 | </para> | ||
2703 | |||
2704 | </listitem></varlistentry> | ||
2705 | <varlistentry><term><emphasis>setkeycodes | ||
2706 | |||
2707 | </emphasis></term> | ||
2708 | <listitem><para></para> | ||
2709 | |||
2710 | <para> | ||
2711 | Usage: setkeycodes SCANCODE KEYCODE ... | ||
2712 | |||
2713 | |||
2714 | </para> | ||
2715 | |||
2716 | <para> | ||
2717 | Set entries into the kernel's scancode-to-keycode map, allowing unusual | ||
2718 | keyboards to generate usable keycodes. | ||
2719 | |||
2720 | |||
2721 | </para> | ||
2722 | |||
2723 | <para> | ||
2724 | SCANCODE may be either xx or e0xx (hexadecimal), and KEYCODE is given in | ||
2725 | decimal | ||
2726 | |||
2727 | |||
2728 | </para> | ||
2729 | |||
2730 | <para> | ||
2731 | Example: | ||
2732 | |||
2733 | |||
2734 | </para> | ||
2735 | |||
2736 | <para> | ||
2737 | <screen> | ||
2738 | # setkeycodes e030 127 | ||
2739 | </screen> | ||
2740 | |||
2741 | |||
2742 | </para> | ||
2743 | |||
2744 | <para> | ||
2745 | ------------------------------- | ||
2746 | |||
2747 | |||
2748 | </para> | ||
2749 | |||
2750 | </listitem></varlistentry> | ||
2751 | <varlistentry><term><emphasis>sfdisk | ||
2752 | |||
2753 | </emphasis></term> | ||
2754 | <listitem><para></para> | ||
2755 | |||
2756 | <para> | ||
2757 | Usage: sfdisk [options] device ... | ||
2758 | |||
2759 | |||
2760 | </para> | ||
2761 | |||
2762 | <para> | ||
2763 | device: something like /dev/hda or /dev/sda | ||
2764 | |||
2765 | |||
2766 | </para> | ||
2767 | |||
2768 | <para> | ||
2769 | useful options: | ||
2770 | |||
2771 | |||
2772 | </para> | ||
2773 | |||
2774 | <para> | ||
2775 | <screen> | ||
2776 | -s [or --show-size]: list size of a partition | ||
2777 | -c [or --id]: print or change partition Id | ||
2778 | -l [or --list]: list partitions of each device | ||
2779 | -d [or --dump]: idem, but in a format suitable for later input | ||
2780 | -i [or --increment]: number cylinders etc. from 1 instead of from 0 | ||
2781 | -uS, -uB, -uC, -uM: accept/report in units of sectors/blocks/cylinders/MB | ||
2782 | -T [or --list-types]:list the known partition types | ||
2783 | -D [or --DOS]: for DOS-compatibility: waste a little space | ||
2784 | -R [or --re-read]: make kernel reread partition table | ||
2785 | -N# : change only the partition with number # | ||
2786 | -n : do not actually write to disk | ||
2787 | -O file : save the sectors that will be overwritten to file | ||
2788 | -I file : restore these sectors again | ||
2789 | -v [or --version]: print version | ||
2790 | -? [or --help]: print this message | ||
2791 | </screen> | ||
2792 | |||
2793 | |||
2794 | </para> | ||
2795 | |||
2796 | <para> | ||
2797 | dangerous options: | ||
2798 | |||
2799 | |||
2800 | </para> | ||
2801 | |||
2802 | <para> | ||
2803 | <screen> | ||
2804 | -g [or --show-geometry]: print the kernel's idea of the geometry | ||
2805 | -x [or --show-extended]: also list extended partitions on output | ||
2806 | </screen> | ||
2807 | |||
2808 | |||
2809 | </para> | ||
2810 | |||
2811 | <para> | ||
2812 | <screen> | ||
2813 | or expect descriptors for them on input | ||
2814 | -L [or --Linux]: do not complain about things irrelevant for Linux | ||
2815 | -q [or --quiet]: suppress warning messages | ||
2816 | You can override the detected geometry using: | ||
2817 | -C# [or --cylinders #]:set the number of cylinders to use | ||
2818 | -H# [or --heads #]: set the number of heads to use | ||
2819 | -S# [or --sectors #]: set the number of sectors to use | ||
2820 | </screen> | ||
2821 | |||
2822 | |||
2823 | </para> | ||
2824 | |||
2825 | <para> | ||
2826 | You can disable all consistency checking with: | ||
2827 | |||
2828 | |||
2829 | </para> | ||
2830 | |||
2831 | <para> | ||
2832 | <screen> | ||
2833 | -f [or --force]: do what I say, even if it is stupid | ||
2834 | </screen> | ||
2835 | |||
2836 | |||
2837 | </para> | ||
2838 | |||
2839 | <para> | ||
2840 | ------------------------------- | ||
2841 | |||
2842 | |||
2843 | </para> | ||
2844 | |||
2845 | </listitem></varlistentry> | ||
2846 | <varlistentry><term><emphasis>sh | ||
2847 | |||
2848 | </emphasis></term> | ||
2849 | <listitem><para></para> | ||
2850 | |||
2851 | <para> | ||
2852 | Usage: sh | ||
2853 | |||
2854 | |||
2855 | </para> | ||
2856 | |||
2857 | <para> | ||
2858 | lash -- the BusyBox LAme SHell (command interpreter) | ||
2859 | |||
2860 | |||
2861 | </para> | ||
2862 | |||
2863 | <para> | ||
2864 | This command does not yet have proper documentation. | ||
2865 | |||
2866 | |||
2867 | </para> | ||
2868 | |||
2869 | <para> | ||
2870 | Use lash just as you would use any other shell. It properly handles pipes, | ||
2871 | redirects, job control, can be used as the shell for scripts (#!/bin/sh), | ||
2872 | and has a sufficient set of builtins to do what is needed. It does not | ||
2873 | (yet) support Bourne Shell syntax. If you need things like | ||
2874 | ``if-then-else'', ``while'', and such, use ash or bash. If you just need a | ||
2875 | very simple and extremely small shell, this will do the job. | ||
2876 | |||
2877 | |||
2878 | </para> | ||
2879 | |||
2880 | <para> | ||
2881 | ------------------------------- | ||
2882 | |||
2883 | |||
2884 | </para> | ||
2885 | |||
2886 | </listitem></varlistentry> | ||
2887 | <varlistentry><term><emphasis>sleep | ||
2888 | |||
2889 | </emphasis></term> | ||
2890 | <listitem><para></para> | ||
2891 | |||
2892 | <para> | ||
2893 | Usage: sleep N | ||
2894 | |||
2895 | |||
2896 | </para> | ||
2897 | |||
2898 | <para> | ||
2899 | Pause for N seconds. | ||
2900 | |||
2901 | |||
2902 | </para> | ||
2903 | |||
2904 | <para> | ||
2905 | Example: | ||
2906 | |||
2907 | |||
2908 | </para> | ||
2909 | |||
2910 | <para> | ||
2911 | <screen> | ||
2912 | $ sleep 2 | ||
2913 | [2 second delay results] | ||
2914 | </screen> | ||
2915 | |||
2916 | |||
2917 | </para> | ||
2918 | |||
2919 | <para> | ||
2920 | ------------------------------- | ||
2921 | |||
2922 | |||
2923 | </para> | ||
2924 | |||
2925 | </listitem></varlistentry> | ||
2926 | <varlistentry><term><emphasis>sort | ||
2927 | |||
2928 | </emphasis></term> | ||
2929 | <listitem><para></para> | ||
2930 | |||
2931 | <para> | ||
2932 | Usage: sort [<emphasis>-n</emphasis>] [<emphasis>-r</emphasis>] [FILE]... | ||
2933 | |||
2934 | |||
2935 | </para> | ||
2936 | |||
2937 | <para> | ||
2938 | Sorts lines of text in the specified files | ||
2939 | |||
2940 | |||
2941 | </para> | ||
2942 | |||
2943 | <para> | ||
2944 | Example: | ||
2945 | |||
2946 | |||
2947 | </para> | ||
2948 | |||
2949 | <para> | ||
2950 | <screen> | ||
2951 | $ echo -e "e\nf\nb\nd\nc\na" | sort | ||
2952 | a | ||
2953 | b | ||
2954 | c | ||
2955 | d | ||
2956 | e | ||
2957 | f | ||
2958 | </screen> | ||
2959 | |||
2960 | |||
2961 | </para> | ||
2962 | |||
2963 | <para> | ||
2964 | ------------------------------- | ||
2965 | |||
2966 | |||
2967 | </para> | ||
2968 | |||
2969 | </listitem></varlistentry> | ||
2970 | <varlistentry><term><emphasis>swapoff | ||
2971 | |||
2972 | </emphasis></term> | ||
2973 | <listitem><para></para> | ||
2974 | |||
2975 | <para> | ||
2976 | Usage: swapoff [OPTION] [device] | ||
2977 | |||
2978 | |||
2979 | </para> | ||
2980 | |||
2981 | <para> | ||
2982 | Stop swapping virtual memory pages on the given device. | ||
2983 | |||
2984 | |||
2985 | </para> | ||
2986 | |||
2987 | <para> | ||
2988 | Options: | ||
2989 | |||
2990 | |||
2991 | </para> | ||
2992 | |||
2993 | <para> | ||
2994 | <screen> | ||
2995 | -a Stop swapping on all swap devices | ||
2996 | </screen> | ||
2997 | |||
2998 | |||
2999 | </para> | ||
3000 | |||
3001 | <para> | ||
3002 | ------------------------------- | ||
3003 | |||
3004 | |||
3005 | </para> | ||
3006 | |||
3007 | </listitem></varlistentry> | ||
3008 | <varlistentry><term><emphasis>swapon | ||
3009 | |||
3010 | </emphasis></term> | ||
3011 | <listitem><para></para> | ||
3012 | |||
3013 | <para> | ||
3014 | Usage: swapon [OPTION] [device] | ||
3015 | |||
3016 | |||
3017 | </para> | ||
3018 | |||
3019 | <para> | ||
3020 | Start swapping virtual memory pages on the given device. | ||
3021 | |||
3022 | |||
3023 | </para> | ||
3024 | |||
3025 | <para> | ||
3026 | Options: | ||
3027 | |||
3028 | |||
3029 | </para> | ||
3030 | |||
3031 | <para> | ||
3032 | <screen> | ||
3033 | -a Start swapping on all swap devices | ||
3034 | </screen> | ||
3035 | |||
3036 | |||
3037 | </para> | ||
3038 | |||
3039 | <para> | ||
3040 | ------------------------------- | ||
3041 | |||
3042 | |||
3043 | </para> | ||
3044 | |||
3045 | </listitem></varlistentry> | ||
3046 | <varlistentry><term><emphasis>sync | ||
3047 | |||
3048 | </emphasis></term> | ||
3049 | <listitem><para></para> | ||
3050 | |||
3051 | <para> | ||
3052 | Usage: sync | ||
3053 | |||
3054 | |||
3055 | </para> | ||
3056 | |||
3057 | <para> | ||
3058 | Write all buffered filesystem blocks to disk. | ||
3059 | |||
3060 | |||
3061 | </para> | ||
3062 | |||
3063 | <para> | ||
3064 | ------------------------------- | ||
3065 | |||
3066 | |||
3067 | </para> | ||
3068 | |||
3069 | </listitem></varlistentry> | ||
3070 | <varlistentry><term><emphasis>syslogd | ||
3071 | |||
3072 | </emphasis></term> | ||
3073 | <listitem><para></para> | ||
3074 | |||
3075 | <para> | ||
3076 | Usage: syslogd [OPTION]... | ||
3077 | |||
3078 | |||
3079 | </para> | ||
3080 | |||
3081 | <para> | ||
3082 | Linux system and kernel (provides klogd) logging utility. Note that this | ||
3083 | version of syslogd/klogd ignores /etc/syslog.conf. | ||
3084 | |||
3085 | |||
3086 | </para> | ||
3087 | |||
3088 | <para> | ||
3089 | Options: | ||
3090 | |||
3091 | |||
3092 | </para> | ||
3093 | |||
3094 | <para> | ||
3095 | <screen> | ||
3096 | -m NUM Interval between MARK lines (default=20min, 0=off) | ||
3097 | -n Run as a foreground process | ||
3098 | -K Do not start up the klogd process | ||
3099 | -O FILE Use an alternate log file (default=/var/log/messages) | ||
3100 | </screen> | ||
3101 | |||
3102 | |||
3103 | </para> | ||
3104 | |||
3105 | <para> | ||
3106 | ------------------------------- | ||
3107 | |||
3108 | |||
3109 | </para> | ||
3110 | |||
3111 | </listitem></varlistentry> | ||
3112 | <varlistentry><term><emphasis>tail | ||
3113 | |||
3114 | </emphasis></term> | ||
3115 | <listitem><para></para> | ||
3116 | |||
3117 | <para> | ||
3118 | Usage: tail [OPTION] [FILE]... | ||
3119 | |||
3120 | |||
3121 | </para> | ||
3122 | |||
3123 | <para> | ||
3124 | Print last 10 lines of each FILE to standard output. With more than one | ||
3125 | FILE, precede each with a header giving the file name. With no FILE, or | ||
3126 | when FILE is -, read standard input. | ||
3127 | |||
3128 | |||
3129 | </para> | ||
3130 | |||
3131 | <para> | ||
3132 | Options: | ||
3133 | |||
3134 | |||
3135 | </para> | ||
3136 | |||
3137 | <para> | ||
3138 | <screen> | ||
3139 | -n NUM Print last NUM lines instead of first 10 | ||
3140 | -f Output data as the file grows. This version | ||
3141 | of 'tail -f' supports only one file at a time. | ||
3142 | </screen> | ||
3143 | |||
3144 | |||
3145 | </para> | ||
3146 | |||
3147 | <para> | ||
3148 | Example: | ||
3149 | |||
3150 | |||
3151 | </para> | ||
3152 | |||
3153 | <para> | ||
3154 | <screen> | ||
3155 | $ tail -n 1 /etc/resolv.conf | ||
3156 | nameserver 10.0.0.1 | ||
3157 | </screen> | ||
3158 | |||
3159 | |||
3160 | </para> | ||
3161 | |||
3162 | <para> | ||
3163 | ------------------------------- | ||
3164 | |||
3165 | |||
3166 | </para> | ||
3167 | |||
3168 | </listitem></varlistentry> | ||
3169 | <varlistentry><term><emphasis>tar | ||
3170 | |||
3171 | </emphasis></term> | ||
3172 | <listitem><para></para> | ||
3173 | |||
3174 | <para> | ||
3175 | Usage: tar -[cxtvO] [<emphasis>--exclude</emphasis> File] [<emphasis>-f</emphasis> tarFile] [FILE] ... | ||
3176 | |||
3177 | |||
3178 | </para> | ||
3179 | |||
3180 | <para> | ||
3181 | Create, extract, or list files from a tar file. Note that this version of | ||
3182 | tar treats hard links as separate files. | ||
3183 | |||
3184 | |||
3185 | </para> | ||
3186 | |||
3187 | <para> | ||
3188 | Main operation mode: | ||
3189 | |||
3190 | |||
3191 | </para> | ||
3192 | |||
3193 | <para> | ||
3194 | <screen> | ||
3195 | c create | ||
3196 | x extract | ||
3197 | t list | ||
3198 | </screen> | ||
3199 | |||
3200 | |||
3201 | </para> | ||
3202 | |||
3203 | <para> | ||
3204 | File selection: | ||
3205 | |||
3206 | |||
3207 | </para> | ||
3208 | |||
3209 | <para> | ||
3210 | <screen> | ||
3211 | f name of tarfile or "-" for stdin | ||
3212 | O extract to stdout | ||
3213 | --exclude file to exclude | ||
3214 | </screen> | ||
3215 | |||
3216 | |||
3217 | </para> | ||
3218 | |||
3219 | <para> | ||
3220 | Informative output: | ||
3221 | |||
3222 | |||
3223 | </para> | ||
3224 | |||
3225 | <para> | ||
3226 | <screen> | ||
3227 | v verbosely list files processed | ||
3228 | </screen> | ||
3229 | |||
3230 | |||
3231 | </para> | ||
3232 | |||
3233 | <para> | ||
3234 | Example: | ||
3235 | |||
3236 | |||
3237 | </para> | ||
3238 | |||
3239 | <para> | ||
3240 | <screen> | ||
3241 | $ zcat /tmp/tarball.tar.gz | tar -xf - | ||
3242 | $ tar -cf /tmp/tarball.tar /usr/local | ||
3243 | </screen> | ||
3244 | |||
3245 | |||
3246 | </para> | ||
3247 | |||
3248 | <para> | ||
3249 | ------------------------------- | ||
3250 | |||
3251 | |||
3252 | </para> | ||
3253 | |||
3254 | </listitem></varlistentry> | ||
3255 | <varlistentry><term><emphasis>tee | ||
3256 | |||
3257 | </emphasis></term> | ||
3258 | <listitem><para></para> | ||
3259 | |||
3260 | <para> | ||
3261 | Usage: tee [OPTION]... [FILE]... | ||
3262 | |||
3263 | |||
3264 | </para> | ||
3265 | |||
3266 | <para> | ||
3267 | Copy standard input to each FILE, and also to standard output. | ||
3268 | |||
3269 | |||
3270 | </para> | ||
3271 | |||
3272 | <para> | ||
3273 | Options: | ||
3274 | |||
3275 | |||
3276 | </para> | ||
3277 | |||
3278 | <para> | ||
3279 | <screen> | ||
3280 | -a append to the given FILEs, do not overwrite | ||
3281 | </screen> | ||
3282 | |||
3283 | |||
3284 | </para> | ||
3285 | |||
3286 | <para> | ||
3287 | Example: | ||
3288 | |||
3289 | |||
3290 | </para> | ||
3291 | |||
3292 | <para> | ||
3293 | <screen> | ||
3294 | $ echo "Hello" | tee /tmp/foo | ||
3295 | $ cat /tmp/foo | ||
3296 | Hello | ||
3297 | </screen> | ||
3298 | |||
3299 | |||
3300 | </para> | ||
3301 | |||
3302 | <para> | ||
3303 | ------------------------------- | ||
3304 | |||
3305 | |||
3306 | </para> | ||
3307 | |||
3308 | </listitem></varlistentry> | ||
3309 | <varlistentry><term><emphasis>telnet | ||
3310 | |||
3311 | </emphasis></term> | ||
3312 | <listitem><para></para> | ||
3313 | |||
3314 | <para> | ||
3315 | Usage: telnet host [port] | ||
3316 | |||
3317 | |||
3318 | </para> | ||
3319 | |||
3320 | <para> | ||
3321 | Telnet is used to establish interactive communication with another computer | ||
3322 | over a network using the TELNET protocol. | ||
3323 | |||
3324 | |||
3325 | </para> | ||
3326 | |||
3327 | <para> | ||
3328 | ------------------------------- | ||
3329 | |||
3330 | |||
3331 | </para> | ||
3332 | |||
3333 | </listitem></varlistentry> | ||
3334 | <varlistentry><term><emphasis>test, [ | ||
3335 | |||
3336 | </emphasis></term> | ||
3337 | <listitem><para></para> | ||
3338 | |||
3339 | <para> | ||
3340 | Usage: test EXPRESSION or [ EXPRESSION ] | ||
3341 | |||
3342 | |||
3343 | </para> | ||
3344 | |||
3345 | <para> | ||
3346 | Checks file types and compares values returning an exit code determined by | ||
3347 | the value of EXPRESSION. | ||
3348 | |||
3349 | |||
3350 | </para> | ||
3351 | |||
3352 | <para> | ||
3353 | Example: | ||
3354 | |||
3355 | |||
3356 | </para> | ||
3357 | |||
3358 | <para> | ||
3359 | <screen> | ||
3360 | $ test 1 -eq 2 | ||
3361 | $ echo $? | ||
3362 | 1 | ||
3363 | $ test 1 -eq 1 | ||
3364 | $ echo $? | ||
3365 | 0 | ||
3366 | $ [ -d /etc ] | ||
3367 | $ echo $? | ||
3368 | 0 | ||
3369 | $ [ -d /junk ] | ||
3370 | $ echo $? | ||
3371 | 1 | ||
3372 | </screen> | ||
3373 | |||
3374 | |||
3375 | </para> | ||
3376 | |||
3377 | <para> | ||
3378 | ------------------------------- | ||
3379 | |||
3380 | |||
3381 | </para> | ||
3382 | |||
3383 | </listitem></varlistentry> | ||
3384 | <varlistentry><term><emphasis>touch | ||
3385 | |||
3386 | </emphasis></term> | ||
3387 | <listitem><para></para> | ||
3388 | |||
3389 | <para> | ||
3390 | Usage: touch [<emphasis>-c</emphasis>] file [file ...] | ||
3391 | |||
3392 | |||
3393 | </para> | ||
3394 | |||
3395 | <para> | ||
3396 | Update the last-modified date on (or create) the selected file[s]. | ||
3397 | |||
3398 | |||
3399 | </para> | ||
3400 | |||
3401 | <para> | ||
3402 | Example: | ||
3403 | |||
3404 | |||
3405 | </para> | ||
3406 | |||
3407 | <para> | ||
3408 | <screen> | ||
3409 | $ ls -l /tmp/foo | ||
3410 | /bin/ls: /tmp/foo: No such file or directory | ||
3411 | $ touch /tmp/foo | ||
3412 | $ ls -l /tmp/foo | ||
3413 | -rw-rw-r-- 1 andersen andersen 0 Apr 15 01:11 /tmp/foo | ||
3414 | </screen> | ||
3415 | |||
3416 | |||
3417 | </para> | ||
3418 | |||
3419 | <para> | ||
3420 | ------------------------------- | ||
3421 | |||
3422 | |||
3423 | </para> | ||
3424 | |||
3425 | </listitem></varlistentry> | ||
3426 | <varlistentry><term><emphasis>tr | ||
3427 | |||
3428 | </emphasis></term> | ||
3429 | <listitem><para></para> | ||
3430 | |||
3431 | <para> | ||
3432 | Usage: tr [-cds] STRING1 [STRING2] | ||
3433 | |||
3434 | |||
3435 | </para> | ||
3436 | |||
3437 | <para> | ||
3438 | Translate, squeeze, and/or delete characters from standard input, writing | ||
3439 | to standard output. | ||
3440 | |||
3441 | |||
3442 | </para> | ||
3443 | |||
3444 | <para> | ||
3445 | Options: | ||
3446 | |||
3447 | |||
3448 | </para> | ||
3449 | |||
3450 | <para> | ||
3451 | <screen> | ||
3452 | -c take complement of STRING1 | ||
3453 | -d delete input characters coded STRING1 | ||
3454 | -s squeeze multiple output characters of STRING2 into one character | ||
3455 | </screen> | ||
3456 | |||
3457 | |||
3458 | </para> | ||
3459 | |||
3460 | <para> | ||
3461 | Example: | ||
3462 | |||
3463 | |||
3464 | </para> | ||
3465 | |||
3466 | <para> | ||
3467 | <screen> | ||
3468 | $ echo "gdkkn vnqkc" | tr [a-y] [b-z] | ||
3469 | hello world | ||
3470 | </screen> | ||
3471 | |||
3472 | |||
3473 | </para> | ||
3474 | |||
3475 | <para> | ||
3476 | ------------------------------- | ||
3477 | |||
3478 | |||
3479 | </para> | ||
3480 | |||
3481 | </listitem></varlistentry> | ||
3482 | <varlistentry><term><emphasis>true | ||
3483 | |||
3484 | </emphasis></term> | ||
3485 | <listitem><para></para> | ||
3486 | |||
3487 | <para> | ||
3488 | Returns an exit code of TRUE (0) | ||
3489 | |||
3490 | |||
3491 | </para> | ||
3492 | |||
3493 | <para> | ||
3494 | Example: | ||
3495 | |||
3496 | |||
3497 | </para> | ||
3498 | |||
3499 | <para> | ||
3500 | <screen> | ||
3501 | $ true | ||
3502 | $ echo $? | ||
3503 | 0 | ||
3504 | </screen> | ||
3505 | |||
3506 | |||
3507 | </para> | ||
3508 | |||
3509 | <para> | ||
3510 | ------------------------------- | ||
3511 | |||
3512 | |||
3513 | </para> | ||
3514 | |||
3515 | </listitem></varlistentry> | ||
3516 | <varlistentry><term><emphasis>tty | ||
3517 | |||
3518 | </emphasis></term> | ||
3519 | <listitem><para></para> | ||
3520 | |||
3521 | <para> | ||
3522 | Usage: tty | ||
3523 | |||
3524 | |||
3525 | </para> | ||
3526 | |||
3527 | <para> | ||
3528 | Print the file name of the terminal connected to standard input. | ||
3529 | |||
3530 | |||
3531 | </para> | ||
3532 | |||
3533 | <para> | ||
3534 | Options: | ||
3535 | |||
3536 | |||
3537 | </para> | ||
3538 | |||
3539 | <para> | ||
3540 | <screen> | ||
3541 | -s print nothing, only return an exit status | ||
3542 | </screen> | ||
3543 | |||
3544 | |||
3545 | </para> | ||
3546 | |||
3547 | <para> | ||
3548 | Example: | ||
3549 | |||
3550 | |||
3551 | </para> | ||
3552 | |||
3553 | <para> | ||
3554 | <screen> | ||
3555 | $ tty | ||
3556 | /dev/tty2 | ||
3557 | </screen> | ||
3558 | |||
3559 | |||
3560 | </para> | ||
3561 | |||
3562 | <para> | ||
3563 | ------------------------------- | ||
3564 | |||
3565 | |||
3566 | </para> | ||
3567 | |||
3568 | </listitem></varlistentry> | ||
3569 | <varlistentry><term><emphasis>umount | ||
3570 | |||
3571 | </emphasis></term> | ||
3572 | <listitem><para></para> | ||
3573 | |||
3574 | <para> | ||
3575 | Usage: umount [flags] filesystem|directory | ||
3576 | |||
3577 | |||
3578 | </para> | ||
3579 | |||
3580 | <para> | ||
3581 | Flags: | ||
3582 | |||
3583 | |||
3584 | </para> | ||
3585 | |||
3586 | <para> | ||
3587 | <screen> | ||
3588 | -a: Unmount all file systems | ||
3589 | -r: Try to remount devices as read-only if mount is busy | ||
3590 | -f: Force filesystem umount (i.e. unreachable NFS server) | ||
3591 | -l: Do not free loop device (if a loop device has been used) | ||
3592 | </screen> | ||
3593 | |||
3594 | |||
3595 | </para> | ||
3596 | |||
3597 | <para> | ||
3598 | Example: | ||
3599 | |||
3600 | |||
3601 | </para> | ||
3602 | |||
3603 | <para> | ||
3604 | <screen> | ||
3605 | $ umount /dev/hdc1 | ||
3606 | </screen> | ||
3607 | |||
3608 | |||
3609 | </para> | ||
3610 | |||
3611 | <para> | ||
3612 | ------------------------------- | ||
3613 | |||
3614 | |||
3615 | </para> | ||
3616 | |||
3617 | </listitem></varlistentry> | ||
3618 | <varlistentry><term><emphasis>uname | ||
3619 | |||
3620 | </emphasis></term> | ||
3621 | <listitem><para></para> | ||
3622 | |||
3623 | <para> | ||
3624 | Usage: uname [OPTION]... | ||
3625 | |||
3626 | |||
3627 | </para> | ||
3628 | |||
3629 | <para> | ||
3630 | Print certain system information. With no OPTION, same as <emphasis>-s</emphasis>. | ||
3631 | |||
3632 | |||
3633 | </para> | ||
3634 | |||
3635 | <para> | ||
3636 | Options: | ||
3637 | |||
3638 | |||
3639 | </para> | ||
3640 | |||
3641 | <para> | ||
3642 | <screen> | ||
3643 | -a print all information | ||
3644 | -m the machine (hardware) type | ||
3645 | -n print the machine's network node hostname | ||
3646 | -r print the operating system release | ||
3647 | -s print the operating system name | ||
3648 | -p print the host processor type | ||
3649 | -v print the operating system version | ||
3650 | </screen> | ||
3651 | |||
3652 | |||
3653 | </para> | ||
3654 | |||
3655 | <para> | ||
3656 | Example: | ||
3657 | |||
3658 | |||
3659 | </para> | ||
3660 | |||
3661 | <para> | ||
3662 | <screen> | ||
3663 | $ uname -a | ||
3664 | Linux debian 2.2.15pre13 #5 Tue Mar 14 16:03:50 MST 2000 i686 unknown | ||
3665 | </screen> | ||
3666 | |||
3667 | |||
3668 | </para> | ||
3669 | |||
3670 | <para> | ||
3671 | ------------------------------- | ||
3672 | |||
3673 | |||
3674 | </para> | ||
3675 | |||
3676 | </listitem></varlistentry> | ||
3677 | <varlistentry><term><emphasis>uniq | ||
3678 | |||
3679 | </emphasis></term> | ||
3680 | <listitem><para></para> | ||
3681 | |||
3682 | <para> | ||
3683 | Usage: uniq [OPTION]... [INPUT [OUTPUT]] | ||
3684 | |||
3685 | |||
3686 | </para> | ||
3687 | |||
3688 | <para> | ||
3689 | Discard all but one of successive identical lines from INPUT (or standard | ||
3690 | input), writing to OUTPUT (or standard output). | ||
3691 | |||
3692 | |||
3693 | </para> | ||
3694 | |||
3695 | <para> | ||
3696 | Example: | ||
3697 | 2357 | ||
2358 | <para> | ||
2359 | Usage: ps | ||
2360 | </para> | ||
3698 | 2361 | ||
3699 | </para> | 2362 | <para> |
2363 | Report process status. This version of ps accepts no | ||
2364 | options. | ||
2365 | </para> | ||
3700 | 2366 | ||
3701 | <para> | 2367 | <para> |
3702 | <screen> | 2368 | Options: |
3703 | $ echo -e "a\na\nb\nc\nc\na" | sort | uniq | 2369 | </para> |
3704 | a | ||
3705 | b | ||
3706 | c | ||
3707 | </screen> | ||
3708 | 2370 | ||
2371 | <para> | ||
2372 | <screen> | ||
2373 | </screen> | ||
2374 | </para> | ||
3709 | 2375 | ||
3710 | </para> | 2376 | <para> |
2377 | Example: | ||
2378 | </para> | ||
3711 | 2379 | ||
3712 | <para> | 2380 | <para> |
3713 | ------------------------------- | 2381 | <screen> |
2382 | $ ps | ||
2383 | PID Uid Gid State Command | ||
2384 | 1 root root S init | ||
2385 | 2 root root S [kflushd] | ||
2386 | 3 root root S [kupdate] | ||
2387 | 4 root root S [kpiod] | ||
2388 | 5 root root S [kswapd] | ||
2389 | 742 andersen andersen S [bash] | ||
2390 | 743 andersen andersen S -bash | ||
2391 | 745 root root S [getty] | ||
2392 | 2990 andersen andersen R ps | ||
2393 | </screen> | ||
2394 | </para> | ||
2395 | </sect1> | ||
3714 | 2396 | ||
2397 | <sect1 id="pwd"> | ||
2398 | <title>pwd</title> | ||
3715 | 2399 | ||
3716 | </para> | 2400 | <para> |
2401 | Usage: pwd | ||
2402 | </para> | ||
3717 | 2403 | ||
3718 | </listitem></varlistentry> | 2404 | <para> |
3719 | <varlistentry><term><emphasis>update | 2405 | Print the full filename of the current working |
2406 | directory. | ||
2407 | </para> | ||
3720 | 2408 | ||
3721 | </emphasis></term> | 2409 | <para> |
3722 | <listitem><para></para> | 2410 | Example: |
2411 | </para> | ||
3723 | 2412 | ||
3724 | <para> | 2413 | <para> |
3725 | Usage: update [options] | 2414 | <screen> |
2415 | $ pwd | ||
2416 | /root | ||
2417 | </screen> | ||
2418 | </para> | ||
2419 | </sect1> | ||
3726 | 2420 | ||
2421 | <sect1 id="reboot"> | ||
2422 | <title>reboot</title> | ||
3727 | 2423 | ||
3728 | </para> | 2424 | <para> |
2425 | Usage: reboot | ||
2426 | </para> | ||
3729 | 2427 | ||
3730 | <para> | 2428 | <para> |
3731 | Periodically flushes filesystem buffers. | 2429 | Reboot the system. |
2430 | </para> | ||
2431 | </sect1> | ||
3732 | 2432 | ||
2433 | <sect1 id="rm"> | ||
2434 | <title>rm</title> | ||
3733 | 2435 | ||
3734 | </para> | 2436 | <para> |
2437 | Usage: rm [OPTION]... FILE... | ||
2438 | </para> | ||
3735 | 2439 | ||
3736 | <para> | 2440 | <para> |
3737 | Options: | 2441 | Remove (unlink) the FILE(s). You may use '--' to |
2442 | indicate that all following arguments are non-options. | ||
2443 | </para> | ||
3738 | 2444 | ||
2445 | <para> | ||
2446 | Options: | ||
2447 | </para> | ||
3739 | 2448 | ||
3740 | </para> | 2449 | <para> |
2450 | <screen> | ||
2451 | -f Remove existing destinations, never prompt | ||
2452 | -r or -R Remove the contents of directories recursively | ||
2453 | </screen> | ||
2454 | </para> | ||
3741 | 2455 | ||
3742 | <para> | 2456 | <para> |
3743 | <screen> | 2457 | Example: |
3744 | -S force use of sync(2) instead of flushing | 2458 | </para> |
3745 | -s SECS call sync this often (default 30) | ||
3746 | -f SECS flush some buffers this often (default 5) | ||
3747 | </screen> | ||
3748 | 2459 | ||
2460 | <para> | ||
2461 | <screen> | ||
2462 | $ rm -rf /tmp/foo | ||
2463 | </screen> | ||
2464 | </para> | ||
2465 | </sect1> | ||
3749 | 2466 | ||
3750 | </para> | 2467 | <sect1 id="rmdir"> |
2468 | <title>rmdir</title> | ||
3751 | 2469 | ||
3752 | <para> | 2470 | <para> |
3753 | ------------------------------- | 2471 | Usage: rmdir DIRECTORY... |
2472 | </para> | ||
3754 | 2473 | ||
2474 | <para> | ||
2475 | Remove DIRECTORY(s) if they are empty. | ||
2476 | </para> | ||
3755 | 2477 | ||
3756 | </para> | 2478 | <para> |
2479 | Example: | ||
2480 | </para> | ||
3757 | 2481 | ||
3758 | </listitem></varlistentry> | 2482 | <para> |
3759 | <varlistentry><term><emphasis>uptime | 2483 | <screen> |
2484 | $ rmdir /tmp/foo | ||
2485 | </screen> | ||
2486 | </para> | ||
2487 | </sect1> | ||
3760 | 2488 | ||
3761 | </emphasis></term> | 2489 | <sect1 id="rmmod"> |
3762 | <listitem><para></para> | 2490 | <title>rmmod</title> |
3763 | 2491 | ||
3764 | <para> | 2492 | <para> |
3765 | Usage: uptime | 2493 | Usage: rmmod [OPTION]... [MODULE]... |
2494 | </para> | ||
3766 | 2495 | ||
2496 | <para> | ||
2497 | Unload MODULE(s) from the kernel. | ||
2498 | </para> | ||
3767 | 2499 | ||
3768 | </para> | 2500 | <para> |
2501 | Options: | ||
2502 | </para> | ||
3769 | 2503 | ||
3770 | <para> | 2504 | <para> |
3771 | Tells how long the system has been running since boot. | 2505 | <screen> |
2506 | -a Try to remove all unused kernel modules | ||
2507 | </screen> | ||
2508 | </para> | ||
3772 | 2509 | ||
2510 | <para> | ||
2511 | Example: | ||
2512 | </para> | ||
3773 | 2513 | ||
3774 | </para> | 2514 | <para> |
2515 | <screen> | ||
2516 | $ rmmod tulip | ||
2517 | </screen> | ||
2518 | </para> | ||
2519 | </sect1> | ||
3775 | 2520 | ||
3776 | <para> | 2521 | <sect1 id="sed"> |
3777 | Example: | 2522 | <title>sed</title> |
3778 | 2523 | ||
2524 | <para> | ||
2525 | Usage: sed [OPTION]... SCRIPT [FILE]... | ||
2526 | </para> | ||
3779 | 2527 | ||
3780 | </para> | 2528 | <para> |
2529 | Allowed sed scripts come in the following form: | ||
2530 | </para> | ||
3781 | 2531 | ||
3782 | <para> | 2532 | <para> |
3783 | <screen> | 2533 | <screen> |
3784 | $ uptime | 2534 | ADDR [!] COMMAND |
3785 | 1:55pm up 2:30, load average: 0.09, 0.04, 0.00 | 2535 | </screen> |
3786 | </screen> | 2536 | </para> |
3787 | 2537 | ||
2538 | <para> | ||
2539 | ADDR can be: | ||
2540 | </para> | ||
3788 | 2541 | ||
3789 | </para> | 2542 | <para> |
2543 | <screen> | ||
2544 | NUMBER Match specified line number | ||
2545 | $ Match last line | ||
2546 | /REGEXP/ Match specified regexp | ||
2547 | </screen> | ||
2548 | </para> | ||
3790 | 2549 | ||
3791 | <para> | 2550 | <para> |
3792 | ------------------------------- | 2551 | ! inverts the meaning of the match |
2552 | </para> | ||
3793 | 2553 | ||
2554 | <para> | ||
2555 | COMMAND can be: | ||
2556 | </para> | ||
3794 | 2557 | ||
3795 | </para> | 2558 | <para> |
2559 | <screen> | ||
2560 | s/regexp/replacement/[igp] | ||
2561 | which attempt to match regexp against the pattern space | ||
2562 | and if successful replaces the matched portion with replacement. | ||
2563 | aTEXT | ||
2564 | which appends TEXT after the pattern space | ||
2565 | </screen> | ||
2566 | </para> | ||
3796 | 2567 | ||
3797 | </listitem></varlistentry> | 2568 | <para> |
3798 | <varlistentry><term><emphasis>usleep | 2569 | This version of sed matches full regular expressions. |
2570 | </para> | ||
3799 | 2571 | ||
3800 | </emphasis></term> | 2572 | <para> |
3801 | <listitem><para></para> | 2573 | Options: |
2574 | </para> | ||
3802 | 2575 | ||
3803 | <para> | 2576 | <para> |
3804 | Usage: usleep N | 2577 | <screen> |
2578 | -e Add the script to the commands to be executed | ||
2579 | -n Suppress automatic printing of pattern space | ||
2580 | </screen> | ||
2581 | </para> | ||
3805 | 2582 | ||
2583 | <para> | ||
2584 | Example: | ||
2585 | </para> | ||
3806 | 2586 | ||
3807 | </para> | 2587 | <para> |
2588 | <screen> | ||
2589 | $ echo "foo" | sed -e 's/f[a-zA-Z]o/bar/g' | ||
2590 | bar | ||
2591 | </screen> | ||
2592 | </para> | ||
2593 | </sect1> | ||
3808 | 2594 | ||
3809 | <para> | 2595 | <sect1 id="setkeycodes"> |
3810 | Pauses for N microseconds. | 2596 | <title>setkeycodes</title> |
3811 | 2597 | ||
2598 | <para> | ||
2599 | Usage: setkeycodes SCANCODE KEYCODE ... | ||
2600 | </para> | ||
3812 | 2601 | ||
3813 | </para> | 2602 | <para> |
2603 | Set entries into the kernel's scancode-to-keycode map, | ||
2604 | allowing unusual keyboards to generate usable keycodes. | ||
2605 | </para> | ||
3814 | 2606 | ||
3815 | <para> | 2607 | <para> |
3816 | Example: | 2608 | SCANCODE may be either xx or e0xx (hexadecimal), and |
2609 | KEYCODE is given in decimal. | ||
2610 | </para> | ||
3817 | 2611 | ||
2612 | <para> | ||
2613 | Example: | ||
2614 | </para> | ||
3818 | 2615 | ||
3819 | </para> | 2616 | <para> |
2617 | <screen> | ||
2618 | $ setkeycodes e030 127 | ||
2619 | </screen> | ||
2620 | </para> | ||
2621 | </sect1> | ||
3820 | 2622 | ||
3821 | <para> | 2623 | <sect1 id="sfdisk"> |
3822 | <screen> | 2624 | <title>sfdisk</title> |
3823 | $ usleep 1000000 | ||
3824 | [pauses for 1 second] | ||
3825 | </screen> | ||
3826 | 2625 | ||
2626 | <para> | ||
2627 | Usage: sfdisk [OPTION]... DEVICE | ||
2628 | </para> | ||
3827 | 2629 | ||
3828 | </para> | 2630 | <para> |
2631 | Partition DEVICE. | ||
2632 | </para> | ||
3829 | 2633 | ||
3830 | <para> | 2634 | <para> |
3831 | ------------------------------- | 2635 | Options: |
2636 | </para> | ||
3832 | 2637 | ||
2638 | <para> | ||
2639 | <screen> | ||
2640 | -s List size of a partition | ||
2641 | -c Print or change partition Id | ||
2642 | -l List partitions of each device | ||
2643 | -d Idem, but in a format suitable for later input | ||
2644 | -i Number cylinders etc. from 1 instead of from 0 | ||
2645 | -uS Accept/report in units of sectors | ||
2646 | -uB Accept/report in units of blocks | ||
2647 | -uC Accept/report in units of cylinders | ||
2648 | -uM Accept/report in units of MB | ||
2649 | -T List the known partition types | ||
2650 | -D For DOS-compatibility: waste a little space | ||
2651 | -R Make kernel reread partition table | ||
2652 | -N NUM Change only the partition with number NUM | ||
2653 | -n Do not actually write to disk | ||
2654 | -O FILE Save the sectors that will be overwritten to FILE | ||
2655 | -I FILE Restore these sectors from FILE | ||
2656 | </screen> | ||
2657 | </para> | ||
3833 | 2658 | ||
3834 | </para> | 2659 | <para> |
2660 | Dangerous options: | ||
2661 | </para> | ||
3835 | 2662 | ||
3836 | </listitem></varlistentry> | 2663 | <para> |
3837 | <varlistentry><term><emphasis>uudecode | 2664 | <screen> |
2665 | -g Print the kernel's idea of the geometry | ||
2666 | -x Also list extended partitions on output | ||
2667 | or expect descriptors for them on input | ||
2668 | -L Do not complain about things irrelevant for Linux | ||
2669 | -q Suppress warning messages | ||
2670 | </screen> | ||
2671 | </para> | ||
3838 | 2672 | ||
3839 | </emphasis></term> | 2673 | <para> |
3840 | <listitem><para></para> | 2674 | You can override the detected geometry using: |
2675 | </para> | ||
3841 | 2676 | ||
3842 | <para> | 2677 | <para> |
3843 | Usage: uudecode [OPTION] [FILE] | 2678 | <screen> |
2679 | -C NUM Set the number of cylinders to use | ||
2680 | -H NUM Set the number of heads to use | ||
2681 | -S NUM Set the number of sectors to use | ||
2682 | </screen> | ||
2683 | </para> | ||
3844 | 2684 | ||
2685 | <para> | ||
2686 | You can disable all consistency checking with: | ||
2687 | </para> | ||
3845 | 2688 | ||
3846 | </para> | 2689 | <para> |
2690 | <screen> | ||
2691 | -f Do what I say, even if it is stupid | ||
2692 | </screen> | ||
2693 | </para> | ||
2694 | </sect1> | ||
3847 | 2695 | ||
3848 | <para> | 2696 | <sect1 id="sh"> |
3849 | Uudecode a uuencoded file | 2697 | <title>sh</title> |
3850 | 2698 | ||
2699 | <para> | ||
2700 | Usage: sh | ||
2701 | </para> | ||
3851 | 2702 | ||
3852 | </para> | 2703 | <para> |
2704 | lash -- the BusyBox LAme SHell (command interpreter) | ||
2705 | </para> | ||
3853 | 2706 | ||
3854 | <para> | 2707 | <para> |
3855 | Options: | 2708 | This command does not yet have proper documentation. |
2709 | </para> | ||
3856 | 2710 | ||
2711 | <para> | ||
2712 | Use lash just as you would use any other shell. It | ||
2713 | properly handles pipes, redirects, job control, can be | ||
2714 | used as the shell for scripts (#!/bin/sh), and has a | ||
2715 | sufficient set of builtins to do what is needed. It does | ||
2716 | not (yet) support Bourne Shell syntax. If you need | ||
2717 | things like ``if-then-else'', ``while'', and such, use | ||
2718 | ash or bash. If you just need a very simple and | ||
2719 | extremely small shell, this will do the job. | ||
2720 | </para> | ||
2721 | </sect1> | ||
3857 | 2722 | ||
3858 | </para> | 2723 | <sect1 id="sleep"> |
2724 | <title>sleep</title> | ||
3859 | 2725 | ||
3860 | <para> | 2726 | <para> |
3861 | <screen> | 2727 | Usage: sleep N |
3862 | -o FILE direct output to FILE | 2728 | </para> |
3863 | </screen> | ||
3864 | 2729 | ||
2730 | <para> | ||
2731 | Pause for N seconds. | ||
2732 | </para> | ||
3865 | 2733 | ||
3866 | </para> | 2734 | <para> |
2735 | Example: | ||
2736 | </para> | ||
3867 | 2737 | ||
3868 | <para> | 2738 | <para> |
3869 | Example: | 2739 | <screen> |
2740 | $ sleep 2 | ||
2741 | [2 second delay results] | ||
2742 | </screen> | ||
2743 | </para> | ||
2744 | </sect1> | ||
3870 | 2745 | ||
2746 | <sect1 id="sort"> | ||
2747 | <title>sort</title> | ||
3871 | 2748 | ||
3872 | </para> | 2749 | <para> |
2750 | Usage: sort [OPTION]... [FILE]... | ||
2751 | </para> | ||
3873 | 2752 | ||
3874 | <para> | 2753 | <para> |
3875 | <screen> | 2754 | Sort lines of text in FILE(s). |
3876 | $ uudecode -o busybox busybox.uu | 2755 | </para> |
3877 | $ ls -l busybox | ||
3878 | -rwxr-xr-x 1 ams ams 245264 Jun 7 21:35 busybox | ||
3879 | </screen> | ||
3880 | 2756 | ||
2757 | <para> | ||
2758 | Options: | ||
2759 | </para> | ||
3881 | 2760 | ||
3882 | </para> | 2761 | <para> |
2762 | <screen> | ||
2763 | -n Compare numerically | ||
2764 | -r Reverse after sorting | ||
2765 | </screen> | ||
2766 | </para> | ||
3883 | 2767 | ||
3884 | <para> | 2768 | <para> |
3885 | ------------------------------- | 2769 | Example: |
2770 | </para> | ||
3886 | 2771 | ||
2772 | <para> | ||
2773 | <screen> | ||
2774 | $ echo -e "e\nf\nb\nd\nc\na" | sort | ||
2775 | a | ||
2776 | b | ||
2777 | c | ||
2778 | d | ||
2779 | e | ||
2780 | f | ||
2781 | </screen> | ||
2782 | </para> | ||
2783 | </sect1> | ||
3887 | 2784 | ||
3888 | </para> | 2785 | <sect1 id="swapoff"> |
2786 | <title>swapoff</title> | ||
3889 | 2787 | ||
3890 | </listitem></varlistentry> | 2788 | <para> |
3891 | <varlistentry><term><emphasis>uuencode | 2789 | Usage: swapoff [OPTION] [DEVICE] |
2790 | </para> | ||
3892 | 2791 | ||
3893 | </emphasis></term> | 2792 | <para> |
3894 | <listitem><para></para> | 2793 | Stop swapping virtual memory pages on DEVICE. |
2794 | </para> | ||
3895 | 2795 | ||
3896 | <para> | 2796 | <para> |
3897 | Usage: uuencode [OPTION] [INFILE] REMOTEFILE | 2797 | Options: |
2798 | </para> | ||
3898 | 2799 | ||
2800 | <para> | ||
2801 | <screen> | ||
2802 | -a Stop swapping on all swap devices | ||
2803 | </screen> | ||
2804 | </para> | ||
2805 | </sect1> | ||
3899 | 2806 | ||
3900 | </para> | 2807 | <sect1 id="swapon"> |
2808 | <title>swapon</title> | ||
3901 | 2809 | ||
3902 | <para> | 2810 | <para> |
3903 | Uuencode a file. | 2811 | Usage: swapon [OPTION] [DEVICE] |
2812 | </para> | ||
3904 | 2813 | ||
2814 | <para> | ||
2815 | Start swapping virtual memory pages on the given device. | ||
2816 | </para> | ||
3905 | 2817 | ||
3906 | </para> | 2818 | <para> |
2819 | Options: | ||
2820 | </para> | ||
3907 | 2821 | ||
3908 | <para> | 2822 | <para> |
3909 | Options: | 2823 | <screen> |
2824 | -a Start swapping on all swap devices | ||
2825 | </screen> | ||
2826 | </para> | ||
2827 | </sect1> | ||
3910 | 2828 | ||
2829 | <sect1 id="sync"> | ||
2830 | <title>sync</title> | ||
3911 | 2831 | ||
3912 | </para> | 2832 | <para> |
2833 | Usage: sync | ||
2834 | </para> | ||
3913 | 2835 | ||
3914 | <para> | 2836 | <para> |
3915 | <screen> | 2837 | Write all buffered filesystem blocks to disk. |
3916 | -m use base64 encoding as of RFC1521 | 2838 | </para> |
3917 | </screen> | 2839 | </sect1> |
3918 | 2840 | ||
2841 | <sect1 id="syslogd"> | ||
2842 | <title>syslogd</title> | ||
3919 | 2843 | ||
3920 | </para> | 2844 | <para> |
2845 | Usage: syslogd [OPTION]... | ||
2846 | </para> | ||
3921 | 2847 | ||
3922 | <para> | 2848 | <para> |
3923 | Example: | 2849 | Linux system and kernel (provides klogd) logging |
2850 | utility. Note that this version of syslogd/klogd ignores | ||
2851 | /etc/syslog.conf. | ||
2852 | </para> | ||
3924 | 2853 | ||
2854 | <para> | ||
2855 | Options: | ||
2856 | </para> | ||
3925 | 2857 | ||
3926 | </para> | 2858 | <para> |
2859 | <screen> | ||
2860 | -m NUM Interval between MARK lines (default=20min, 0=off) | ||
2861 | -n Run as a foreground process | ||
2862 | -K Do not start up the klogd process | ||
2863 | -O FILE Use an alternate log file (default=/var/log/messages) | ||
2864 | </screen> | ||
2865 | </para> | ||
3927 | 2866 | ||
3928 | <para> | 2867 | <para> |
3929 | <screen> | 2868 | Example: |
3930 | $ uuencode busybox busybox | 2869 | </para> |
3931 | begin 755 busybox | ||
3932 | M?T5,1@$!`0````````````(``P`!````L+@$"#0```!0N@,``````#0`(``& | ||
3933 | ..... | ||
3934 | $ uudecode busybox busybox > busybox.uu | ||
3935 | $ | ||
3936 | </screen> | ||
3937 | 2870 | ||
2871 | <para> | ||
2872 | <screen> | ||
2873 | </screen> | ||
2874 | </para> | ||
2875 | </sect1> | ||
3938 | 2876 | ||
3939 | </para> | 2877 | <sect1 id="tail"> |
2878 | <title>tail</title> | ||
3940 | 2879 | ||
3941 | <para> | 2880 | <para> |
3942 | ------------------------------- | 2881 | Usage: tail [OPTION] [FILE]... |
2882 | </para> | ||
3943 | 2883 | ||
2884 | <para> | ||
2885 | Print last 10 lines of each FILE to standard output. | ||
2886 | With more than one FILE, precede each with a header | ||
2887 | giving the file name. With no FILE, or when FILE is -, | ||
2888 | read stdin. | ||
2889 | </para> | ||
3944 | 2890 | ||
3945 | </para> | 2891 | <para> |
2892 | Options: | ||
2893 | </para> | ||
3946 | 2894 | ||
3947 | </listitem></varlistentry> | 2895 | <para> |
3948 | <varlistentry><term><emphasis>wc | 2896 | <screen> |
2897 | -n NUM Print last NUM lines instead of last 10 | ||
2898 | -f Output data as the file grows. This version | ||
2899 | of 'tail -f' supports only one file at a time. | ||
2900 | </screen> | ||
2901 | </para> | ||
3949 | 2902 | ||
3950 | </emphasis></term> | 2903 | <para> |
3951 | <listitem><para></para> | 2904 | Example: |
2905 | </para> | ||
3952 | 2906 | ||
3953 | <para> | 2907 | <para> |
3954 | Usage: wc [OPTION]... [FILE]... | 2908 | <screen> |
2909 | $ tail -n 1 /etc/resolv.conf | ||
2910 | nameserver 10.0.0.1 | ||
2911 | </screen> | ||
2912 | </para> | ||
2913 | </sect1> | ||
3955 | 2914 | ||
2915 | <sect1 id="tar"> | ||
2916 | <title>tar</title> | ||
3956 | 2917 | ||
3957 | </para> | 2918 | <para> |
2919 | Usage: tar [MODE] [OPTION] [FILE]... | ||
2920 | </para> | ||
3958 | 2921 | ||
3959 | <para> | 2922 | <para> |
3960 | Print line, word, and byte counts for each FILE, and a total line if more | 2923 | |
3961 | than one FILE is specified. With no FILE, read standard input. | 2924 | </para> |
3962 | 2925 | ||
2926 | <para> | ||
2927 | MODE may be chosen from | ||
2928 | </para> | ||
3963 | 2929 | ||
3964 | </para> | 2930 | <para> |
2931 | <screen> | ||
2932 | c Create | ||
2933 | x Extract | ||
2934 | t List | ||
2935 | </screen> | ||
2936 | </para> | ||
3965 | 2937 | ||
3966 | <para> | 2938 | <para> |
3967 | Options: | 2939 | Options: |
2940 | </para> | ||
3968 | 2941 | ||
2942 | <para> | ||
2943 | <screen> | ||
2944 | f FILE Use FILE for tarfile (or stdin if '-') | ||
2945 | O Extract to stdout | ||
2946 | --exclude FILE Exclude FILE | ||
2947 | v List files processed | ||
2948 | </screen> | ||
2949 | </para> | ||
3969 | 2950 | ||
3970 | </para> | 2951 | <para> |
2952 | Example: | ||
2953 | </para> | ||
3971 | 2954 | ||
3972 | <para> | 2955 | <para> |
3973 | <screen> | 2956 | <screen> |
3974 | -c print the byte counts | 2957 | $ zcat /tmp/tarball.tar.gz | tar -xf - |
3975 | -l print the newline counts | 2958 | $ tar -cf /tmp/tarball.tar /usr/local |
3976 | -L print the length of the longest line | 2959 | </screen> |
3977 | -w print the word counts | 2960 | </para> |
3978 | </screen> | 2961 | </sect1> |
3979 | 2962 | ||
2963 | <sect1 id="tee"> | ||
2964 | <title>tee</title> | ||
3980 | 2965 | ||
3981 | </para> | 2966 | <para> |
2967 | Usage: tee [OPTION]... [FILE]... | ||
2968 | </para> | ||
3982 | 2969 | ||
3983 | <para> | 2970 | <para> |
3984 | Example: | 2971 | Copy stdin to FILE(s), and also to stdout. |
2972 | </para> | ||
3985 | 2973 | ||
2974 | <para> | ||
2975 | Options: | ||
2976 | </para> | ||
3986 | 2977 | ||
3987 | </para> | 2978 | <para> |
2979 | <screen> | ||
2980 | -a Append to the given FILEs, do not overwrite | ||
2981 | </screen> | ||
2982 | </para> | ||
3988 | 2983 | ||
3989 | <para> | 2984 | <para> |
3990 | <screen> | 2985 | Example: |
3991 | $ wc /etc/passwd | 2986 | </para> |
3992 | 31 46 1365 /etc/passwd | ||
3993 | </screen> | ||
3994 | 2987 | ||
2988 | <para> | ||
2989 | <screen> | ||
2990 | $ echo "Hello" | tee /tmp/foo | ||
2991 | Hello | ||
2992 | $ cat /tmp/foo | ||
2993 | Hello | ||
2994 | </screen> | ||
2995 | </para> | ||
2996 | </sect1> | ||
3995 | 2997 | ||
3996 | </para> | 2998 | <sect1 id="telnet"> |
2999 | <title>telnet</title> | ||
3997 | 3000 | ||
3998 | <para> | 3001 | <para> |
3999 | ------------------------------- | 3002 | Usage: telnet HOST [PORT] |
3003 | </para> | ||
4000 | 3004 | ||
3005 | <para> | ||
3006 | Establish interactive communication with another | ||
3007 | computer over a network using the TELNET protocol. | ||
3008 | </para> | ||
3009 | </sect1> | ||
4001 | 3010 | ||
4002 | </para> | 3011 | <sect1 id="test"> |
3012 | <title>test, [</title> | ||
4003 | 3013 | ||
4004 | </listitem></varlistentry> | 3014 | <para> |
4005 | <varlistentry><term><emphasis>which | 3015 | Usage: test EXPRESSION |
3016 | </para> | ||
4006 | 3017 | ||
4007 | </emphasis></term> | 3018 | <para> |
4008 | <listitem><para></para> | 3019 | <screen> |
3020 | or: [ EXPRESSION ] | ||
4009 | 3021 | ||
4010 | <para> | 3022 | <para> |
4011 | Usage: which [COMMAND ...] | 3023 | Check file types and compare values returning an exit |
3024 | code determined by the value of EXPRESSION. | ||
3025 | </para> | ||
4012 | 3026 | ||
3027 | <para> | ||
3028 | Example: | ||
3029 | </para> | ||
4013 | 3030 | ||
4014 | </para> | 3031 | <para> |
3032 | <screen> | ||
3033 | $ test 1 -eq 2 | ||
3034 | $ echo $? | ||
3035 | 1 | ||
3036 | $ test 1 -eq 1 | ||
3037 | $ echo $? | ||
3038 | 0 | ||
3039 | $ [ -d /etc ] | ||
3040 | $ echo $? | ||
3041 | 0 | ||
3042 | $ [ -d /junk ] | ||
3043 | $ echo $? | ||
3044 | 1 | ||
3045 | </screen> | ||
3046 | </para> | ||
3047 | </sect1> | ||
4015 | 3048 | ||
4016 | <para> | 3049 | <sect1 id="touch"> |
4017 | Locates a COMMAND. | 3050 | <title>touch</title> |
4018 | 3051 | ||
3052 | <para> | ||
3053 | Usage: touch [OPTION]... FILE... | ||
3054 | </para> | ||
4019 | 3055 | ||
4020 | </para> | 3056 | <para> |
3057 | Update the last-modified date on (or create) FILE(s). | ||
3058 | </para> | ||
4021 | 3059 | ||
4022 | <para> | 3060 | <para> |
4023 | Example: | 3061 | Options: |
3062 | </para> | ||
4024 | 3063 | ||
3064 | <para> | ||
3065 | <screen> | ||
3066 | -c Do not create files | ||
3067 | </screen> | ||
3068 | </para> | ||
4025 | 3069 | ||
4026 | </para> | 3070 | <para> |
3071 | Example: | ||
3072 | </para> | ||
4027 | 3073 | ||
4028 | <para> | 3074 | <para> |
4029 | <screen> | 3075 | <screen> |
4030 | $ which login | 3076 | $ ls -l /tmp/foo |
4031 | /bin/login | 3077 | /bin/ls: /tmp/foo: No such file or directory |
4032 | </screen> | 3078 | $ touch /tmp/foo |
3079 | $ ls -l /tmp/foo | ||
3080 | -rw-rw-r-- 1 andersen andersen 0 Apr 15 01:11 /tmp/foo | ||
3081 | </screen> | ||
3082 | </para> | ||
3083 | </sect1> | ||
4033 | 3084 | ||
3085 | <sect1 id="tr"> | ||
3086 | <title>tr</title> | ||
4034 | 3087 | ||
4035 | </para> | 3088 | <para> |
3089 | Usage: tr [OPTION]... STRING1 [STRING2] | ||
3090 | </para> | ||
4036 | 3091 | ||
4037 | <para> | 3092 | <para> |
4038 | ------------------------------- | 3093 | Translate, squeeze, and/or delete characters from stdin, |
3094 | writing to stdout. | ||
3095 | </para> | ||
4039 | 3096 | ||
3097 | <para> | ||
3098 | Options: | ||
3099 | </para> | ||
4040 | 3100 | ||
4041 | </para> | 3101 | <para> |
3102 | <screen> | ||
3103 | -c Take complement of STRING1 | ||
3104 | -d Delete input characters coded STRING1 | ||
3105 | -s Squeeze multiple output characters of STRING2 into one character | ||
3106 | </screen> | ||
3107 | </para> | ||
4042 | 3108 | ||
4043 | </listitem></varlistentry> | 3109 | <para> |
4044 | <varlistentry><term><emphasis>whoami | 3110 | Example: |
3111 | </para> | ||
4045 | 3112 | ||
4046 | </emphasis></term> | 3113 | <para> |
4047 | <listitem><para></para> | 3114 | <screen> |
3115 | $ echo "gdkkn vnqkc" | tr [a-y] [b-z] | ||
3116 | hello world | ||
3117 | </screen> | ||
3118 | </para> | ||
3119 | </sect1> | ||
4048 | 3120 | ||
4049 | <para> | 3121 | <sect1 id="true"> |
4050 | Usage: whoami | 3122 | <title>true</title> |
4051 | 3123 | ||
3124 | <para> | ||
3125 | Usage: true | ||
3126 | </para> | ||
4052 | 3127 | ||
4053 | </para> | 3128 | <para> |
3129 | Return an exit code of TRUE (1). | ||
3130 | </para> | ||
4054 | 3131 | ||
4055 | <para> | 3132 | <para> |
4056 | Prints the user name associated with the current effective user id. | 3133 | Example: |
3134 | </para> | ||
4057 | 3135 | ||
3136 | <para> | ||
3137 | <screen> | ||
3138 | $ true | ||
3139 | $ echo $? | ||
3140 | 0 | ||
3141 | </screen> | ||
3142 | </para> | ||
3143 | </sect1> | ||
4058 | 3144 | ||
4059 | </para> | 3145 | <sect1 id="tty"> |
3146 | <title>tty</title> | ||
4060 | 3147 | ||
4061 | <para> | 3148 | <para> |
4062 | Example: | 3149 | Usage: tty |
3150 | </para> | ||
4063 | 3151 | ||
3152 | <para> | ||
3153 | Print the file name of the terminal connected to stdin. | ||
3154 | </para> | ||
4064 | 3155 | ||
4065 | </para> | 3156 | <para> |
3157 | Options: | ||
3158 | </para> | ||
4066 | 3159 | ||
4067 | <para> | 3160 | <para> |
4068 | <screen> | 3161 | <screen> |
4069 | $ whoami | 3162 | -s Print nothing, only return an exit status |
4070 | andersen | 3163 | </screen> |
4071 | </screen> | 3164 | </para> |
4072 | 3165 | ||
3166 | <para> | ||
3167 | Example: | ||
3168 | </para> | ||
4073 | 3169 | ||
4074 | </para> | 3170 | <para> |
3171 | <screen> | ||
3172 | $ tty | ||
3173 | /dev/tty2 | ||
3174 | </screen> | ||
3175 | </para> | ||
3176 | </sect1> | ||
4075 | 3177 | ||
4076 | <para> | 3178 | <sect1 id="umount"> |
4077 | ------------------------------- | 3179 | <title>umount</title> |
4078 | 3180 | ||
3181 | <para> | ||
3182 | Usage: umount [OPTION]... DEVICE|DIRECTORY | ||
3183 | </para> | ||
4079 | 3184 | ||
4080 | </para> | 3185 | <para> |
3186 | |||
3187 | </para> | ||
4081 | 3188 | ||
4082 | </listitem></varlistentry> | 3189 | <para> |
4083 | <varlistentry><term><emphasis>yes | 3190 | Options: |
3191 | </para> | ||
4084 | 3192 | ||
4085 | </emphasis></term> | 3193 | <para> |
4086 | <listitem><para></para> | 3194 | <screen> |
3195 | -a Unmount all file systems | ||
3196 | -r Try to remount devices as read-only if mount is busy | ||
3197 | -f Force filesystem umount (i.e. unreachable NFS server) | ||
3198 | -l Do not free loop device (if a loop device has been used) | ||
3199 | </screen> | ||
3200 | </para> | ||
4087 | 3201 | ||
4088 | <para> | 3202 | <para> |
4089 | Usage: yes [OPTION]... [STRING]... | 3203 | Example: |
3204 | </para> | ||
4090 | 3205 | ||
3206 | <para> | ||
3207 | <screen> | ||
3208 | $ umount /dev/hdc1 | ||
3209 | </screen> | ||
3210 | </para> | ||
3211 | </sect1> | ||
4091 | 3212 | ||
4092 | </para> | 3213 | <sect1 id="uname"> |
3214 | <title>uname</title> | ||
4093 | 3215 | ||
4094 | <para> | 3216 | <para> |
4095 | Repeatedly outputs a line with all specified <literal>STRING(s),</literal> | 3217 | Usage: uname [OPTION]... |
4096 | or `y'. | 3218 | </para> |
4097 | 3219 | ||
3220 | <para> | ||
3221 | Print certain system information. With no OPTION, same | ||
3222 | as -s. | ||
3223 | </para> | ||
4098 | 3224 | ||
4099 | </para> | 3225 | <para> |
3226 | Options: | ||
3227 | </para> | ||
4100 | 3228 | ||
4101 | <para> | 3229 | <para> |
4102 | ------------------------------- | 3230 | <screen> |
3231 | -a Print all information | ||
3232 | -m Print the machine (hardware) type | ||
3233 | -n Print the machine's network node hostname | ||
3234 | -r Print the operating system release | ||
3235 | -s Print the operating system name | ||
3236 | -p Print the host processor type | ||
3237 | -v Print the operating system version | ||
3238 | </screen> | ||
3239 | </para> | ||
4103 | 3240 | ||
3241 | <para> | ||
3242 | Example: | ||
3243 | </para> | ||
4104 | 3244 | ||
4105 | </para> | 3245 | <para> |
3246 | <screen> | ||
3247 | $ uname -a | ||
3248 | Linux debian 2.2.15pre13 #5 Tue Mar 14 16:03:50 MST 2000 i686 unknown | ||
3249 | </screen> | ||
3250 | </para> | ||
3251 | </sect1> | ||
4106 | 3252 | ||
4107 | </listitem></varlistentry> | 3253 | <sect1 id="uniq"> |
4108 | <varlistentry><term><emphasis>zcat | 3254 | <title>uniq</title> |
4109 | 3255 | ||
4110 | </emphasis></term> | 3256 | <para> |
4111 | <listitem><para></para> | 3257 | Usage: uniq [INPUT [OUTPUT]] |
3258 | </para> | ||
4112 | 3259 | ||
4113 | <para> | 3260 | <para> |
4114 | This is essentially an alias for invoking ``gunzip <emphasis>-c</emphasis>'', where it decompresses the file in question and send the output to | 3261 | Discard all but one of successive identical lines from |
4115 | stdout. | 3262 | INPUT (or stdin), writing to OUTPUT (or stdout). |
3263 | </para> | ||
4116 | 3264 | ||
3265 | <para> | ||
3266 | Example: | ||
3267 | </para> | ||
4117 | 3268 | ||
4118 | </para> | 3269 | <para> |
3270 | <screen> | ||
3271 | $ echo -e "a\na\nb\nc\nc\na" | sort | uniq | ||
3272 | a | ||
3273 | b | ||
3274 | c | ||
3275 | </screen> | ||
3276 | </para> | ||
3277 | </sect1> | ||
4119 | 3278 | ||
4120 | <para> | 3279 | <sect1 id="update"> |
4121 | ------------------------------- | 3280 | <title>update</title> |
4122 | 3281 | ||
3282 | <para> | ||
3283 | Usage: update [OPTION]... | ||
3284 | </para> | ||
4123 | 3285 | ||
4124 | </para> | 3286 | <para> |
3287 | Periodically flush filesystem buffers. | ||
3288 | </para> | ||
4125 | 3289 | ||
4126 | </listitem></varlistentry></variablelist> | 3290 | <para> |
3291 | Options: | ||
3292 | </para> | ||
4127 | 3293 | ||
4128 | </sect1> | 3294 | <para> |
3295 | <screen> | ||
3296 | -S Force use of sync(2) instead of flushing | ||
3297 | -s SECS Call sync this often (default 30) | ||
3298 | -f SECS Flush some buffers this often (default 5) | ||
3299 | </screen> | ||
3300 | </para> | ||
3301 | </sect1> | ||
4129 | 3302 | ||
4130 | <sect1 id="pod2docbook-ch-1-sect-6"><title>LIBC NSS | 3303 | <sect1 id="uptime"> |
3304 | <title>uptime</title> | ||
4131 | 3305 | ||
4132 | </title> | 3306 | <para> |
4133 | <!-- Bogus hack to ensure that each sect has a paragraph in it --> | 3307 | Usage: uptime |
4134 | <para> | 3308 | </para> |
4135 | </para> | ||
4136 | 3309 | ||
3310 | <para> | ||
3311 | Display how long the system has been running since boot. | ||
3312 | </para> | ||
4137 | 3313 | ||
4138 | <para> | 3314 | <para> |
4139 | GNU Libc uses the Name Service Switch (NSS) to configure the behavior of | 3315 | Example: |
4140 | the C library for the local environment, and to configure how it reads | 3316 | </para> |
4141 | system data, such as passwords and group information. BusyBox has made it | ||
4142 | Policy that it will never use NSS, and will never use libc calls that | ||
4143 | make use of NSS. This allows you to run an embedded system without the need | ||
4144 | for installing an /etc/nsswitch.conf file and without /lib/libnss_* | ||
4145 | libraries installed. | ||
4146 | 3317 | ||
3318 | <para> | ||
3319 | <screen> | ||
3320 | $ uptime | ||
3321 | 1:55pm up 2:30, load average: 0.09, 0.04, 0.00 | ||
3322 | </screen> | ||
3323 | </para> | ||
3324 | </sect1> | ||
4147 | 3325 | ||
4148 | </para> | 3326 | <sect1 id="usleep"> |
3327 | <title>usleep</title> | ||
4149 | 3328 | ||
4150 | <para> | 3329 | <para> |
4151 | If you are using a system that is using a remote LDAP server for | 3330 | Usage: usleep N |
4152 | authentication via GNU libc NSS, and you want to use BusyBox, then you will | 3331 | </para> |
4153 | need to adjust the BusyBox source. Chances are though, that if you have | ||
4154 | enough space to install of that stuff on your system, then you probably | ||
4155 | want the full GNU utilities. | ||
4156 | 3332 | ||
3333 | <para> | ||
3334 | Pause for N microseconds. | ||
3335 | </para> | ||
4157 | 3336 | ||
4158 | </para> | 3337 | <para> |
3338 | Example: | ||
3339 | </para> | ||
4159 | 3340 | ||
4160 | </sect1> | 3341 | <para> |
3342 | <screen> | ||
3343 | $ usleep 1000000 | ||
3344 | [pauses for 1 second] | ||
3345 | </screen> | ||
3346 | </para> | ||
3347 | </sect1> | ||
4161 | 3348 | ||
4162 | <sect1 id="pod2docbook-ch-1-sect-7"><title>SEE ALSO | 3349 | <sect1 id="uudecode"> |
3350 | <title>uudecode</title> | ||
4163 | 3351 | ||
4164 | </title> | 3352 | <para> |
4165 | <!-- Bogus hack to ensure that each sect has a paragraph in it --> | 3353 | Usage: uudecode [OPTION] [FILE] |
4166 | <para> | 3354 | </para> |
4167 | </para> | ||
4168 | 3355 | ||
3356 | <para> | ||
3357 | Uudecode a uuencoded file. | ||
3358 | </para> | ||
4169 | 3359 | ||
4170 | <para> | 3360 | <para> |
4171 | <literal>textutils(1),</literal> <literal>shellutils(1),</literal> etc... | 3361 | Options: |
3362 | </para> | ||
4172 | 3363 | ||
3364 | <para> | ||
3365 | <screen> | ||
3366 | -o FILE Direct output to FILE | ||
3367 | </screen> | ||
3368 | </para> | ||
4173 | 3369 | ||
4174 | </para> | 3370 | <para> |
3371 | Example: | ||
3372 | </para> | ||
4175 | 3373 | ||
4176 | </sect1> | 3374 | <para> |
3375 | <screen> | ||
3376 | $ uudecode -o busybox busybox.uu | ||
3377 | $ ls -l busybox | ||
3378 | -rwxr-xr-x 1 ams ams 245264 Jun 7 21:35 busybox | ||
3379 | </screen> | ||
3380 | </para> | ||
3381 | </sect1> | ||
4177 | 3382 | ||
4178 | <sect1 id="pod2docbook-ch-1-sect-8"><title>MAINTAINER | 3383 | <sect1 id="uuencode"> |
3384 | <title>uuencode</title> | ||
4179 | 3385 | ||
4180 | </title> | 3386 | <para> |
4181 | <!-- Bogus hack to ensure that each sect has a paragraph in it --> | 3387 | Usage: uuencode [OPTION] [INFILE] OUTFILE |
4182 | <para> | 3388 | </para> |
4183 | </para> | ||
4184 | 3389 | ||
3390 | <para> | ||
3391 | Uuencode a file. | ||
3392 | </para> | ||
4185 | 3393 | ||
4186 | <para> | 3394 | <para> |
4187 | Erik Andersen <andersee@debian.org> <andersen@lineo.com> | 3395 | Options: |
3396 | </para> | ||
4188 | 3397 | ||
3398 | <para> | ||
3399 | <screen> | ||
3400 | -m Use base64 encoding as of RFC1521 | ||
3401 | </screen> | ||
3402 | </para> | ||
4189 | 3403 | ||
4190 | </para> | 3404 | <para> |
3405 | Example: | ||
3406 | </para> | ||
4191 | 3407 | ||
4192 | </sect1> | 3408 | <para> |
3409 | <screen> | ||
3410 | $ uuencode busybox busybox | ||
3411 | begin 755 busybox | ||
3412 | M?T5,1@$!`0````````````(``P`!````L+@$"#0```!0N@,``````#0`(``& | ||
3413 | ..... | ||
3414 | $ uudecode busybox busybox > busybox.uu | ||
3415 | $ | ||
3416 | </screen> | ||
3417 | </para> | ||
3418 | </sect1> | ||
4193 | 3419 | ||
4194 | <sect1 id="pod2docbook-ch-1-sect-9"><title>AUTHORS | 3420 | <sect1 id="wc"> |
3421 | <title>wc</title> | ||
4195 | 3422 | ||
4196 | </title> | 3423 | <para> |
4197 | <!-- Bogus hack to ensure that each sect has a paragraph in it --> | 3424 | Usage: wc [OPTION]... [FILE]... |
4198 | <para> | 3425 | </para> |
4199 | </para> | ||
4200 | 3426 | ||
3427 | <para> | ||
3428 | Print line, word, and byte counts for each FILE, and a | ||
3429 | total line if more than one FILE is specified. With no | ||
3430 | FILE, read stdin. | ||
3431 | </para> | ||
4201 | 3432 | ||
4202 | <para> | 3433 | <para> |
4203 | The following people have contributed code to BusyBox whether they know it | 3434 | Options: |
4204 | or not. | 3435 | </para> |
4205 | 3436 | ||
3437 | <para> | ||
3438 | <screen> | ||
3439 | -c Print the byte counts | ||
3440 | -l Print the newline counts | ||
3441 | -L Print the length of the longest line | ||
3442 | -w Print the word counts | ||
3443 | </screen> | ||
3444 | </para> | ||
4206 | 3445 | ||
4207 | </para> | 3446 | <para> |
3447 | Example: | ||
3448 | </para> | ||
4208 | 3449 | ||
4209 | <para> | 3450 | <para> |
4210 | Erik Andersen <andersee@debian.org> | 3451 | <screen> |
3452 | $ wc /etc/passwd | ||
3453 | 31 46 1365 /etc/passwd | ||
3454 | </screen> | ||
3455 | </para> | ||
3456 | </sect1> | ||
4211 | 3457 | ||
3458 | <sect1 id="which"> | ||
3459 | <title>which</title> | ||
4212 | 3460 | ||
4213 | </para> | 3461 | <para> |
3462 | Usage: which [COMMAND]... | ||
3463 | </para> | ||
4214 | 3464 | ||
4215 | <para> | 3465 | <para> |
4216 | John Beppu <beppu@lineo.com> | 3466 | Locate COMMAND(s). |
3467 | </para> | ||
4217 | 3468 | ||
3469 | <para> | ||
3470 | Example: | ||
3471 | </para> | ||
4218 | 3472 | ||
4219 | </para> | 3473 | <para> |
3474 | <screen> | ||
3475 | $ which login | ||
3476 | /bin/login | ||
3477 | </screen> | ||
3478 | </para> | ||
3479 | </sect1> | ||
4220 | 3480 | ||
4221 | <para> | 3481 | <sect1 id="whoami"> |
4222 | Brian Candler <B.Candler@pobox.com> | 3482 | <title>whoami</title> |
4223 | 3483 | ||
3484 | <para> | ||
3485 | Usage: whoami | ||
3486 | </para> | ||
4224 | 3487 | ||
4225 | </para> | 3488 | <para> |
3489 | Print the user name associated with the current | ||
3490 | effective user id. | ||
3491 | </para> | ||
4226 | 3492 | ||
4227 | <para> | 3493 | <para> |
4228 | Randolph Chung <tausq@debian.org> | 3494 | Example: |
3495 | </para> | ||
4229 | 3496 | ||
3497 | <para> | ||
3498 | <screen> | ||
3499 | $ whoami | ||
3500 | andersen | ||
3501 | </screen> | ||
3502 | </para> | ||
3503 | </sect1> | ||
4230 | 3504 | ||
4231 | </para> | 3505 | <sect1 id="yes"> |
3506 | <title>yes</title> | ||
4232 | 3507 | ||
4233 | <para> | 3508 | <para> |
4234 | Dave Cinege <dcinege@psychosis.com> | 3509 | Usage: yes [STRING]... |
3510 | </para> | ||
4235 | 3511 | ||
3512 | <para> | ||
3513 | Repeatedly output a line with all specified STRING(s), | ||
3514 | or `y'. | ||
3515 | </para> | ||
3516 | </sect1> | ||
4236 | 3517 | ||
4237 | </para> | 3518 | <sect1 id="zcat"> |
3519 | <title>zcat</title> | ||
4238 | 3520 | ||
4239 | <para> | 3521 | <para> |
4240 | Karl M. Hegbloom <karlheg@debian.org> | 3522 | Usage: zcat [OPTION]... FILE |
3523 | </para> | ||
4241 | 3524 | ||
3525 | <para> | ||
3526 | Uncompress FILE (or stdin if FILE is '-') to stdout. | ||
3527 | </para> | ||
4242 | 3528 | ||
4243 | </para> | 3529 | <para> |
3530 | Options: | ||
3531 | </para> | ||
4244 | 3532 | ||
4245 | <para> | 3533 | <para> |
4246 | John Lombardo <john@deltanet.com> | 3534 | <screen> |
3535 | -t Test compressed file integrity | ||
3536 | </screen> | ||
3537 | </para> | ||
4247 | 3538 | ||
3539 | <para> | ||
3540 | Example: | ||
3541 | </para> | ||
4248 | 3542 | ||
4249 | </para> | 3543 | <para> |
3544 | <screen> | ||
3545 | </screen> | ||
3546 | </para> | ||
3547 | </sect1> | ||
3548 | </chapter> | ||
4250 | 3549 | ||
4251 | <para> | 3550 | <chapter id="LIBC-NSS"> |
4252 | Glenn McGrath <bug1@netconnect.com.au> | 3551 | <title>LIBC NSS</title> |
4253 | 3552 | ||
3553 | <para> | ||
3554 | GNU Libc uses the Name Service Switch (NSS) to configure the | ||
3555 | behavior of the C library for the local environment, and to | ||
3556 | configure how it reads system data, such as passwords and group | ||
3557 | information. BusyBox has made it Policy that it will never use | ||
3558 | NSS, and will never use libc calls that make use of NSS. This | ||
3559 | allows you to run an embedded system without the need for | ||
3560 | installing an /etc/nsswitch.conf file and without /lib/libnss_* | ||
3561 | libraries installed. | ||
3562 | </para> | ||
4254 | 3563 | ||
4255 | </para> | 3564 | <para> |
3565 | If you are using a system that is using a remote LDAP server for | ||
3566 | authentication via GNU libc NSS, and you want to use BusyBox, | ||
3567 | then you will need to adjust the BusyBox source. Chances are | ||
3568 | though, that if you have enough space to install of that stuff | ||
3569 | on your system, then you probably want the full GNU utilities. | ||
3570 | </para> | ||
3571 | </chapter> | ||
4256 | 3572 | ||
4257 | <para> | 3573 | <chapter id="SEE-ALSO"> |
4258 | Bruce Perens <bruce@perens.com> | 3574 | <title>SEE ALSO</title> |
4259 | 3575 | ||
3576 | <para> | ||
3577 | <literal>textutils(1),</literal> | ||
3578 | <literal>shellutils(1),</literal> | ||
3579 | etc... | ||
3580 | </para> | ||
3581 | </chapter> | ||
4260 | 3582 | ||
4261 | </para> | 3583 | <chapter id="MAINTAINER"> |
3584 | <title>MAINTAINER</title> | ||
4262 | 3585 | ||
4263 | <para> | 3586 | <para> |
4264 | Pavel Roskin <proski@gnu.org> | 3587 | Erik Andersen <andersee@debian.org> <andersen@lineo.com> |
3588 | </para> | ||
3589 | </chapter> | ||
4265 | 3590 | ||
3591 | <chapter id="AUTHORS"> | ||
3592 | <title>AUTHORS</title> | ||
4266 | 3593 | ||
4267 | </para> | 3594 | <para> |
3595 | The following people have contributed code to BusyBox whether | ||
3596 | they know it or not. | ||
3597 | </para> | ||
4268 | 3598 | ||
4269 | <para> | 3599 | <para> |
4270 | Linus Torvalds <torvalds@transmeta.com> | 3600 | Erik Andersen <andersee@debian.org> |
3601 | </para> | ||
4271 | 3602 | ||
3603 | <para> | ||
3604 | John Beppu <beppu@lineo.com> | ||
3605 | </para> | ||
4272 | 3606 | ||
4273 | </para> | 3607 | <para> |
3608 | Brian Candler <B.Candler@pobox.com> | ||
3609 | </para> | ||
4274 | 3610 | ||
4275 | <para> | 3611 | <para> |
4276 | Charles P. Wright <cpwright@villagenet.com> | 3612 | Randolph Chung <tausq@debian.org> |
3613 | </para> | ||
4277 | 3614 | ||
3615 | <para> | ||
3616 | Dave Cinege <dcinege@psychosis.com> | ||
3617 | </para> | ||
4278 | 3618 | ||
4279 | </para> | 3619 | <para> |
3620 | Karl M. Hegbloom <karlheg@debian.org> | ||
3621 | </para> | ||
4280 | 3622 | ||
4281 | <para> | 3623 | <para> |
4282 | Enrique Zanardi <ezanardi@ull.es> | 3624 | John Lombardo <john@deltanet.com> |
3625 | </para> | ||
4283 | 3626 | ||
3627 | <para> | ||
3628 | Glenn McGrath <bug1@netconnect.com.au> | ||
3629 | </para> | ||
4284 | 3630 | ||
4285 | </para> | 3631 | <para> |
3632 | Bruce Perens <bruce@perens.com> | ||
3633 | </para> | ||
4286 | 3634 | ||
4287 | </sect1> | 3635 | <para> |
3636 | Pavel Roskin <proski@gnu.org> | ||
3637 | </para> | ||
4288 | 3638 | ||
4289 | </chapter> | 3639 | <para> |
3640 | Linus Torvalds <torvalds@transmeta.com> | ||
3641 | </para> | ||
4290 | 3642 | ||
3643 | <para> | ||
3644 | Charles P. Wright <cpwright@villagenet.com> | ||
3645 | </para> | ||
4291 | 3646 | ||
3647 | <para> | ||
3648 | Enrique Zanardi <ezanardi@ull.es> | ||
3649 | </para> | ||
3650 | </chapter> | ||
4292 | </book> <!-- End of the book --> | 3651 | </book> <!-- End of the book --> |