making note of my changes.
[oweals/busybox.git] / CommandList
1 The following document includes a continuous description of the current
2 commands, functions and utilities included in the busybox.
3
4 John Cooper       
5 johnc@lineo.com
6
7 _______________________________________________________________________________________________________
8
9
10
11
12                     BusyBox 0.38, Functions and the Arguments they Support 
13
14
15
16
17 ______________________________________________________________________________________________________
18
19
20
21
22
23 cat [file]        
24                 Display file contents to standard output.
25
26
27
28
29 _______________________________________________________________________________________________________
30
31
32
33
34
35 chmod [-R] Mode,[Mode] file
36
37                 Change file access permissions (mode) of one or more files.
38
39         -R      Follows the directory tree from the current location thru all sub-directories,
40
41                 applying changes.
42
43                 Mode =  u  User
44
45                         g  Group
46
47                         o  Other
48
49                         a  All
50
51                 Permission =    r  Read
52
53                                 w  Write
54
55                                 s  Set user (or group) ID
56
57                                 t  Sticky bit file cannot be removed by other
58
59                                    than the owner.
60
61
62
63
64 ________________________________________________________________________________________________________
65
66
67
68
69
70 chown [option] owner[group]file
71
72                 Change owner and (or) group of file to owner and (or) group.    
73
74                 Only the current owner or a priveleged user may change an owner.
75
76         -R      Follows the directory tree from the current location thru all sub-directories, applying
77
78                 changes.
79
80
81
82
83
84 ________________________________________________________________________________________________________
85
86
87
88
89
90
91 chgrp [option] newgroup file
92
93                 Change group of file or files  to new group name or ID number located in /etc/group.
94
95                 Only the current owner or a priveleged user may change the group name or ID 
96
97         -R      Follows the directory tree from the current location thru all sub-directories,
98
99                 applying changes.
100
101
102
103
104
105
106 ________________________________________________________________________________________________________
107
108
109
110
111
112 chroot NEWROOT [Command...]                  (System Admin Command)
113
114                 Run command with root directory set to NEWROOT.  Only the current owner or a priveleged 
115
116                 user may use this command.
117
118
119
120
121
122 ________________________________________________________________________________________________________
123
124
125
126
127
128 clear
129
130                 Clear screen.
131
132
133
134
135
136
137 ________________________________________________________________________________________________________
138
139
140
141
142
143 cp [option] fileA fileB
144
145         Copy fileA to fileB or fileA to directory maintaining fileA name.
146
147                 -a      archive         Maintain file attributes whenever possible. Same as -dpR
148
149                 -d      no dereference  Maintain hard link relationships between fileA and fileB.
150
151                                         No dereference of symbolic links.
152
153                 -p      maintain file   Maintain all file attributes and information including owner 
154
155                         attributes      group permissions and time information.
156
157                 -R      recursive       Copy to the current location and all subdirectories in the tree.
158
159
160
161
162
163 _________________________________________________________________________________________________________
164
165
166
167
168
169 date [option [+format] [date]
170
171 date [option] [MMDDhhmm[[CC]YY][.SS]]
172
173         Display the current system date and time.
174
175                 -R      RFC-822 string  Output an RFC-822 compliant date string.
176
177                 -s      set DATE        Set date where date is entered in MMDDhhmm etc. format.
178
179                 -u      universal       Print or set Coordinated Universal Time.
180
181
182
183
184
185 _______________________________________________________________________________________________________
186
187
188
189
190
191
192 dd [if=name] [of=name] [bs=n] [count=n]
193
194
195         Copy a file, converting and formatting according to options.  Most useful when copying from
196
197         physical input and output devices.
198
199                 if=fileA  (instead of standard input)
200
201                 of=fileB  (instead of standard output)
202
203                 bs=n      Read and write N Bytes at a time.
204
205                 count=n   Copy only n input blocks.
206
207         Bytes may be suffixed by k for x1024, b for x512 and w for x2.
208
209
210
211
212
213 ________________________________________________________________________________________________________
214
215
216
217
218
219 df
220
221
222         Display filesystem, number of blocks used, number of blocks available, number of blocks in use,
223
224         and mount point.
225         
226
227
228
229
230
231 ________________________________________________________________________________________________________
232
233
234
235
236
237
238 dmesg [-c] [-n level] [-s bufsize]            (System Admin Command)
239
240
241         Display system control messages.  Stored in the kernel ring buffer are all messages since the
242
243         last system boot, or the most recent if the buffer had been full.
244
245
246                 -c              Clear buffer after printing messages.
247                 
248                 -n level        Set the level of system message to be displayed on the console.
249
250                 -s bufsize      Display the size of the kernel ring buffer.
251         
252
253
254
255
256 ________________________________________________________________________________________________________
257
258
259
260
261
262
263 find [PATH] [EXPRESSION]
264
265         Search for files in the current directory, and all subdirectories for patterns that match
266
267         expression.  Expressions may consist of the following.
268
269                 -follow         Dereference symbolic links.
270
271                 -name PATTERN   Find files that match PATTERN. Metacharacters should be escaped or  
272
273                                 quoted.
274
275                 -print          Print full file name, followed by a newline, to standard out.
276
277
278
279
280
281
282 ________________________________________________________________________________________________________
283
284
285
286
287
288 chvt N
289
290         Change foreground virtual terminal to /dev/ttyN.
291
292
293
294
295
296 ________________________________________________________________________________________________________
297
298
299
300
301
302 deallocvt N
303
304         Deallocate unused virtual terminal /dev/ttyN.
305
306
307
308
309
310 ________________________________________________________________________________________________________
311
312
313
314
315
316 fsck.minix [-larvsmf] /dev/name
317
318         Perform a consistency check for minix filesystems.
319
320                 -l      List filenames.
321
322                 -r      Perform interactive repairs. 
323
324                 -q      Perform automatic repairs
325
326                 -v      Verbose
327
328                 -s      Output superblock information
329
330                 -m      Activates minix-like "mode not cleared" warnings.
331
332                 -f      Force file system check.
333
334
335
336
337 ________________________________________________________________________________________________________
338
339
340
341
342
343 mkfs.minix [-c | -l filename ] [-nXX] [-iXX] /dev/name [blocks]
344
345         Make a minix file system.
346
347                 -c      Check device for bad blocks.
348
349                 -n      [ 14|30 ] Specify max length of filenames.
350
351                 -i      Specify number of inodes for filesystem.
352
353                 -l filename
354
355                         Read the bad blocks list from filename.
356
357                 -v      Make a minix version 2 filesystem.
358
359
360
361
362
363 ________________________________________________________________________________________________________
364
365
366
367
368
369 grep [OPTIONS] PATTERN [FILE]
370
371         Search for PATTERN in each FILE or from standard input.
372
373                 -h      Suppress prefixing filename on output.
374
375                 -i      Ignore case distinctions.
376
377                 -n      Print line number with output lines.
378
379
380
381
382
383 ________________________________________________________________________________________________________
384
385
386
387
388
389 init
390
391         The parent of all processes.  Only to be run by the kernel.
392
393
394
395
396
397 ________________________________________________________________________________________________________
398
399
400
401
402
403 kill [ -s sigspec | -signum | -sigspec ] [pid | job ]  or
404
405 kill -l [ exitstatus ]
406
407         Currently no information help page for this command
408
409
410
411
412
413 ________________________________________________________________________________________________________
414
415
416
417
418
419 ln [option] TARGET... LINK_NAME|DIRECTORY
420
421         Create a link named LINK_NAME or DIRECTORY to TARGET.
422
423                 -s      Make symbolic links instead of hard links.
424
425                 -f      Remove existing destination files.
426
427
428
429
430
431 ________________________________________________________________________________________________________
432
433
434
435
436
437 ls [ -1acdelnpuxACF ] [FILENAMES]
438
439         List contents of directories.
440
441                 -1      Single entry per column of output.
442
443                 -a      All files including hidden files beginning with a ..    
444
445                 -c      Files are listed by status change time.
446
447                 -d      List directories, not there contents.
448
449                 -e      (no information on this option)
450
451                 -l      List in long format including permissions, owner, size
452
453                         modification time etc.  
454
455                 -n      Similar to -l, except use group ID and user ID instead
456
457                         of owner and group names.
458
459                 -p      Directories are marked with a /.
460
461                 -u      Display files sorted by file access time.
462
463                 -x      Display files across the screen in rows.
464
465                 -A      Display hidden and all other files except . and ...
466
467                 -C      (Default, display files in columns)
468
469                 -F      Tag files by type by appending:
470
471                                 / to directories
472         
473                                 * to executables
474
475                                 @ to symbolic links
476
477                                 | to fifo's
478
479                                 = to sockets
480
481
482
483
484
485
486 ________________________________________________________________________________________________________
487
488
489
490
491
492 mkdir [OPTION] directory
493
494         Create directories if they do not already exist.  You must have write permission to create
495
496         directories. Default mode can be modified by users umask.
497
498                 -m      Used to set permission mode. (See chmod description)
499
500                 -p      Make parent directories if they don't already exist.  Return error code if
501
502                         they already exist.
503
504
505
506
507
508
509 ________________________________________________________________________________________________________
510
511
512
513
514
515 mknod   (Segmentation Fault when executing this command)        
516
517         (No embedix information available for this command.)
518
519
520
521
522
523 ________________________________________________________________________________________________________
524
525
526
527
528
529
530 mkswap [-c] [ -v0|-v1 ] device [block-count]
531
532         Prepare a disk partition to be used as a swap partition.
533
534                 -c      Check for read-ability.
535
536                 -v0     Make version 0 swap [max 128 megs]
537
538                 -v1     Make version 1 swap [big |] default for
539
540                         kernels > 2.1.117.
541
542                 block-count
543
544                         Number of blocks to use. (Default is the entire 
545
546                         partition).
547
548
549
550
551
552
553 ________________________________________________________________________________________________________
554
555
556
557
558
559 more [file]
560
561         Display file one screen page at a time.
562
563
564
565
566 ________________________________________________________________________________________________________
567
568
569
570
571
572 mount [flags]
573
574 mount [flags] device directory [-o options, more options ]
575
576         Mount a filesystem for file access.
577
578                 -a      Mount all file systems in fstab.
579
580                 -o option
581
582                         async/sync:     Writes are asynchronous/synchronous.
583
584                         dev/nodev:      Allow use of special device files
585
586                                         /disallow them.
587
588                         exec/noexec:    Allow use of executable files
589
590                                         /disallow them.
591
592                         suid/nosuid:    Allow set-user-id-root programs
593
594                                         /disallow them.
595
596                         remount:        Remount a currently-mounted filesystem
597
598                                         changing it's flags.
599
600                         ro/rw:          Mount for read-only/read-write.
601
602                         (There are more flags specific to each filesystem.
603
604                          See the written documentation for those.)
605
606                 -r      Mount the filesystem read only.
607
608                 -t FILESYSTEM TYPE
609
610                         Specify the filesystem type.
611
612                 -w      Mount for reading and writing default
613
614                 
615
616
617
618
619 ________________________________________________________________________________________________________
620
621
622
623
624
625
626 mv fileA fileB    or
627
628 mv fileA dirA
629
630         Move fileA to fileB.  (Renames fileA to fileB)
631
632         Move fileA to dirA    (Moves fileA into dirA)
633
634
635
636
637
638 ________________________________________________________________________________________________________
639
640
641
642
643
644 ps
645
646         Report process status.  No options are currently supported.
647
648
649
650
651
652 ________________________________________________________________________________________________________
653
654
655
656
657
658 pwd
659
660         Print working directory  
661
662
663
664
665
666 ________________________________________________________________________________________________________
667
668
669
670
671
672 reboot
673
674         Reboot system.  No options are currently supported.
675
676
677
678
679
680 ________________________________________________________________________________________________________
681
682
683
684
685
686 rm [option] file
687
688         Remove or unlink the files.
689
690                 -f      Remove existing destinations.  Never prompt.
691
692                 -r or -R  Remove contents of directories recursively.
693
694
695
696
697 ________________________________________________________________________________________________________
698
699
700
701
702
703 rmdir [OPTION] ... directory
704
705         Remove directories if they are empty.
706
707
708
709
710 ________________________________________________________________________________________________________
711
712
713
714
715
716 sed
717
718         Sed scripts are subject to the following format: 's/regexp/replacement/[gp]' which attempts to
719
720         to match regexp against the pattern space and if successful, replaces the matched portion with
721
722         replacement -r or -R  Remove contents of directories recursively.
723
724
725
726
727 ________________________________________________________________________________________________________
728
729
730
731
732
733 rmdir [OPTION] ... directory
734
735         Remove directories if they are empty.
736
737
738
739
740
741 ________________________________________________________________________________________________________
742
743
744
745
746
747 rmdir [OPTION] ... directory
748
749         Remove directories if they are empty.
750
751
752
753
754 ________________________________________________________________________________________________________
755
756
757
758
759
760 sed
761
762         Sed scripts are subject to the following format:  's/regexp/replacement/[gp]' which attempts to
763
764         match regexp against the pattern space and if successful, replaces the matched portion with 
765
766         replacement.  This version of sed matches
767
768         full regular expressions.
769
770                 -e      Add the script to the commands to be executed.
771
772                 -n      Suppress automatic printing of pattern space..
773
774                 -e      Add the script to the commands to be executed.
775
776                 -n      Suppress automatic printing of pattern space..
777
778                 -e      Add the script to the commands to be executed.
779
780                 -n      Suppress automatic printing of pattern space.
781
782
783         
784
785
786 ________________________________________________________________________________________________________
787
788
789
790
791
792 sleep N
793
794         Pause for N seconds.
795
796
797
798
799
800 ________________________________________________________________________________________________________
801
802
803
804
805
806 tar -[cxtvOf] [tarFileName] [file]
807
808         Create, extract or list files from a tar file.
809
810                 c=create
811                 
812                 x=extract
813
814                 t=list contents
815
816                 v=verbose
817
818                 O=extract to stdout
819
820                 f=tarfile or "-" for standard input
821
822
823
824
825
826 ________________________________________________________________________________________________________
827
828
829
830
831
832 swapon device
833
834         Start swapping virtual memory pages on the given device.
835
836
837
838
839
840 ________________________________________________________________________________________________________
841
842
843
844
845
846 swapoff device
847
848         Stop swapping virtual memory pages on the given device.
849
850
851
852
853
854 ________________________________________________________________________________________________________
855
856
857
858
859
860 sync
861
862         Write all buffered filesystem blocks to disk.
863
864
865
866
867
868 ________________________________________________________________________________________________________
869
870
871
872
873
874 touch [-c] file [file...]
875
876         Update the last modified date on given file(s).
877
878
879
880
881
882 ________________________________________________________________________________________________________
883
884
885
886
887
888 true
889
890         A null command that returns a successful 0 exit status code. (See false)
891
892
893
894
895
896 ________________________________________________________________________________________________________
897
898
899
900
901
902 false
903
904         A null command that returns an unsuccessful or non-zero exit status.
905
906
907
908
909
910 ________________________________________________________________________________________________________
911
912
913
914
915
916 uname [option]
917
918         Print certain system information.  With no option, same as -s.
919
920                 -a      Display all information
921
922                 -m      Display machine hardware type.
923
924                 -n      Display machine network node hostname.
925
926                 -r      Display OS release
927
928                 -s      Display OS Name.
929
930                 -p      Display Host processor type.
931
932                 -v      Display OS Version.
933
934
935
936
937
938 ________________________________________________________________________________________________________
939
940
941
942
943
944 umount [flags] filesystem | directory
945
946         Unmounts designated filesystem previously mounted on device.
947
948                 -a      Unmount all file systems.
949
950
951
952
953
954 ________________________________________________________________________________________________________
955
956
957
958
959
960 update
961
962 cvs update [options] files
963
964         Incorporates recent changes from the repository into files in your working directory.  No 
965
966         options are currently supported.
967
968
969
970
971
972 ________________________________________________________________________________________________________
973
974
975
976
977
978 zcat [options] files
979
980         Uncompress file from gzip, gunzip or compress command or standard input if file is '-'.
981
982                 -c      Write output to standard output.
983
984
985
986
987
988 ________________________________________________________________________________________________________
989
990
991
992
993
994 gunzip  (Same as zcat)
995
996
997
998
999
1000 ________________________________________________________________________________________________________
1001
1002
1003
1004
1005
1006
1007 gzip   (Same as zcat)
1008
1009
1010
1011
1012
1013 ________________________________________________________________________________________________________
1014
1015
1016
1017
1018
1019
1020 loadfont   
1021
1022         No information available with --help.
1023
1024
1025
1026
1027 ________________________________________________________________________________________________________
1028
1029
1030
1031
1032
1033 loadkmap
1034
1035         No information available with --help
1036
1037
1038
1039
1040
1041 ________________________________________________________________________________________________________
1042
1043
1044
1045
1046
1047 linuxrc
1048
1049         No information available with --help
1050
1051
1052
1053
1054
1055 ________________________________________________________________________________________________________
1056