blob: 39c72a17a56638656897d760433b568e4a2bbc32 [file] [log] [blame]
Eric Andersen0f0fcec1999-12-12 05:32:52 +00001The following document includes a continuous description of the current
2commands, functions and utilities included in the busybox.
3
4John Cooper
5johnc@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
23cat [file]
24 Display file contents to standard output.
25
26
27
28
29_______________________________________________________________________________________________________
30
31
32
33
34
35chmod [-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
70chown [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
91chgrp [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
112chroot 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
128clear
129
130 Clear screen.
131
132
133
134
135
136
137________________________________________________________________________________________________________
138
139
140
141
142
143cp [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
169date [option [+format] [date]
170
171date [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
192dd [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
219df
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
238dmesg [-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
263find [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
288chvt N
289
290 Change foreground virtual terminal to /dev/ttyN.
291
292
293
294
295
296________________________________________________________________________________________________________
297
298
299
300
301
302deallocvt N
303
304 Deallocate unused virtual terminal /dev/ttyN.
305
306
307
308
309
310________________________________________________________________________________________________________
311
312
313
314
315
316fsck.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
343mkfs.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
369grep [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
389init
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
403kill [ -s sigspec | -signum | -sigspec ] [pid | job ] or
404
405kill -l [ exitstatus ]
406
407 Currently no information help page for this command
408
409
410
411
412
413________________________________________________________________________________________________________
414
415
416
417
418
419ln [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
437ls [ -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
492mkdir [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
515mknod (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
530mkswap [-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
559more [file]
560
561 Display file one screen page at a time.
562
563
564
565
566________________________________________________________________________________________________________
567
568
569
570
571
572mount [flags]
573
574mount [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
626mv fileA fileB or
627
628mv 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
644ps
645
646 Report process status. No options are currently supported.
647
648
649
650
651
652________________________________________________________________________________________________________
653
654
655
656
657
658pwd
659
660 Print working directory
661
662
663
664
665
666________________________________________________________________________________________________________
667
668
669
670
671
672reboot
673
674 Reboot system. No options are currently supported.
675
676
677
678
679
680________________________________________________________________________________________________________
681
682
683
684
685
686rm [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
703rmdir [OPTION] ... directory
704
705 Remove directories if they are empty.
706
707
708
709
710________________________________________________________________________________________________________
711
712
713
714
715
716sed
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
733rmdir [OPTION] ... directory
734
735 Remove directories if they are empty.
736
737
738
739
740
741________________________________________________________________________________________________________
742
743
744
745
746
747rmdir [OPTION] ... directory
748
749 Remove directories if they are empty.
750
751
752
753
754________________________________________________________________________________________________________
755
756
757
758
759
760sed
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
792sleep N
793
794 Pause for N seconds.
795
796
797
798
799
800________________________________________________________________________________________________________
801
802
803
804
805
806tar -[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
832swapon device
833
834 Start swapping virtual memory pages on the given device.
835
836
837
838
839
840________________________________________________________________________________________________________
841
842
843
844
845
846swapoff device
847
848 Stop swapping virtual memory pages on the given device.
849
850
851
852
853
854________________________________________________________________________________________________________
855
856
857
858
859
860sync
861
862 Write all buffered filesystem blocks to disk.
863
864
865
866
867
868________________________________________________________________________________________________________
869
870
871
872
873
874touch [-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
888true
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
902false
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
916uname [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
944umount [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
960update
961
962cvs 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
978zcat [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
994gunzip (Same as zcat)
995
996
997
998
999
1000________________________________________________________________________________________________________
1001
1002
1003
1004
1005
1006
1007gzip (Same as zcat)
1008
1009
1010
1011
1012
1013________________________________________________________________________________________________________
1014
1015
1016
1017
1018
1019
1020loadfont
1021
1022 No information available with --help.
1023
1024
1025
1026
1027________________________________________________________________________________________________________
1028
1029
1030
1031
1032
1033loadkmap
1034
1035 No information available with --help
1036
1037
1038
1039
1040
1041________________________________________________________________________________________________________
1042
1043
1044
1045
1046
1047linuxrc
1048
1049 No information available with --help
1050
1051
1052
1053
1054
1055________________________________________________________________________________________________________
1056