$dockerrun-itbusybox/# grepBusyBoxv1.22.1 (2014-05-22 23:22:11UTC) multi-call binary.Usage:grep [-HhnlLoqvsriwFE] [-m N] [-A/B/C N] PATTERN/-e PATTERN.../-f FILE [FILE]...SearchforPATTERNinFILEs (or stdin)-HAdd'filename:'prefix-hDonotadd'filename:'prefix-nAdd'line_no:'prefix-lShowonlynamesoffilesthatmatch-LShowonlynamesoffilesthatdon't match -c Show only count of matching lines -o Show only the matching part of line -q Quiet. Return 0 if PATTERN is found, 1 otherwise -v Select non-matching lines -s Suppress open and read errors -r Recurse -i Ignore case -w Match whole words only -x Match whole lines only -F PATTERN is a literal (not regexp) -E PATTERN is an extended regexp -m N Match up to N times per file -A N Print N lines of trailing context -B N Print N lines of leading context -C N Same as '-AN-BN' -e PTRN Pattern to match -f FILE Read pattern from file
查看容器内的挂载信息。
/# mountrootfson/typerootfs (rw)noneon/typeaufs (rw,relatime,si=b455817946f8505c)procon/proctypeproc (rw,nosuid,nodev,noexec,relatime)tmpfson/devtypetmpfs (rw,nosuid,mode=755)shmon/dev/shmtypetmpfs (rw,nosuid,nodev,noexec,relatime,size=65536k)devptson/dev/ptstypedevpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666)sysfson/systypesysfs (ro,nosuid,nodev,noexec,relatime)/dev/disk/by-uuid/b1f2dba7-d91b-4165-a377-bf1a8bed3f61 on /etc/resolv.conf type ext4 (rw,relatime,errors=remount-ro,data=ordered)
/dev/disk/by-uuid/b1f2dba7-d91b-4165-a377-bf1a8bed3f61 on /etc/hostname type ext4 (rw,relatime,errors=remount-ro,data=ordered)
/dev/disk/by-uuid/b1f2dba7-d91b-4165-a377-bf1a8bed3f61 on /etc/hosts type ext4 (rw,relatime,errors=remount-ro,data=ordered)
devptson/dev/consoletypedevpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)procon/proc/systypeproc (ro,nosuid,nodev,noexec,relatime)procon/proc/sysrq-triggertypeproc (ro,nosuid,nodev,noexec,relatime)procon/proc/irqtypeproc (ro,nosuid,nodev,noexec,relatime)procon/proc/bustypeproc (ro,nosuid,nodev,noexec,relatime)tmpfson/proc/kcoretypetmpfs (rw,nosuid,mode=755)
busybox 镜像虽然小巧,但包括了大量常见的 Linux 命令,读者可以用它快速熟悉 Linux 命令。