iREADME - plstree - ps and ls displayed as a tree Err bitreich.org 70 hgit clone git://bitreich.org/plstree git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/plstree URL:git://bitreich.org/plstree git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/plstree bitreich.org 70 1Log /scm/plstree/log.gph bitreich.org 70 1Files /scm/plstree/files.gph bitreich.org 70 1Refs /scm/plstree/refs.gph bitreich.org 70 1Tags /scm/plstree/tag bitreich.org 70 1README /scm/plstree/file/README.gph bitreich.org 70 i--- Err bitreich.org 70 iREADME (2995B) Err bitreich.org 70 i--- Err bitreich.org 70 i 1 trees Err bitreich.org 70 i 2 ================================================================================ Err bitreich.org 70 i 3 Err bitreich.org 70 i 4 *plstree* is an collection of awk scripts to display trees, such as process Err bitreich.org 70 i 5 trees (pstree) or a directory tree (lstree). Err bitreich.org 70 i 6 Err bitreich.org 70 i 7 Err bitreich.org 70 i 8 pstree Err bitreich.org 70 i 9 -------------------------------------------------------------------------------- Err bitreich.org 70 i 10 Err bitreich.org 70 i 11 It reads from the ps(1) command, so it is portable if there is POSIX awk(1) and Err bitreich.org 70 i 12 ps(1). Busybox's ps is not fully POSIX but it still works. Err bitreich.org 70 i 13 Err bitreich.org 70 i 14 USER TTY PID STAT COMMAND Err bitreich.org 70 i 15 root ?? 1 Is init Err bitreich.org 70 i 16 josuah ?? 90253 S ├─ abduco Err bitreich.org 70 i 17 josuah ttypb 77909 Ss+ │ └─ vis Err bitreich.org 70 i 18 josuah ttypb 4072 S+p │ └─ ksh Err bitreich.org 70 i 19 josuah ttypb 6615 S+p │ └─ awk Err bitreich.org 70 i 20 josuah ttypb 61142 R+p/2 │ └─ ps Err bitreich.org 70 i 21 josuah ttyp2 53904 I ├─ enchive Err bitreich.org 70 i 22 josuah ttyp8 48679 S └─ runsvdir Err bitreich.org 70 i 23 josuah ?? 38166 Is ├─ runsv Err bitreich.org 70 i 24 josuah ?? 74922 I │ ├─ svlogd Err bitreich.org 70 i 25 josuah ?? 62834 Ip │ └─ ssh-agent Err bitreich.org 70 i 26 josuah ?? 87618 Is ├─ runsv Err bitreich.org 70 i 27 josuah ?? 10571 I │ ├─ svlogd Err bitreich.org 70 i 28 josuah ?? 21319 S │ └─ btpd Err bitreich.org 70 i 29 josuah ?? 18961 Is ├─ runsv Err bitreich.org 70 i 30 josuah ?? 51149 I │ ├─ svlogd Err bitreich.org 70 i 31 josuah ?? 59400 S │ └─ qemu-system-x86_ Err bitreich.org 70 i 32 josuah ?? 14126 Ss └─ runsv Err bitreich.org 70 i 33 josuah ?? 99171 I └─ svlogd Err bitreich.org 70 i 34 Err bitreich.org 70 i 35 It have been tested with OpenBSD and busybox awk and ps. Err bitreich.org 70 i 36 Err bitreich.org 70 i 37 Err bitreich.org 70 i 38 lstree Err bitreich.org 70 i 39 -------------------------------------------------------------------------------- Err bitreich.org 70 i 40 Err bitreich.org 70 i 41 It reads from the find(1) and ls(1) commands and display it as a tree along Err bitreich.org 70 i 42 with the details from ls: Err bitreich.org 70 i 43 Err bitreich.org 70 i 44 -rw-r--r-- 1 josuah wheel 50 Apr 13 08:39 ├─ .gitignore Err bitreich.org 70 i 45 -rw-r--r-- 1 josuah wheel 683 Apr 19 13:12 ├─ Makefile Err bitreich.org 70 i 46 drwxr-xr-x 2 josuah wheel 512 Apr 19 01:59 ├─ bin Err bitreich.org 70 i 47 -rw-r--r-- 1 josuah wheel 142 Apr 19 00:18 │ ├─ agenda Err bitreich.org 70 i 48 -rwxr-xr-x 1 josuah wheel 891 Apr 19 01:59 │ ├─ git Err bitreich.org 70 i 49 -rwxr-xr-x 1 josuah wheel 111 Apr 19 01:00 │ ├─ html Err bitreich.org 70 i 50 -rwxr-xr-x 1 josuah wheel 463 Apr 19 00:18 │ ├─ man Err bitreich.org 70 i 51 -rwxr-xr-x 1 josuah wheel 235 Apr 19 00:19 │ ├─ page Err bitreich.org 70 i 52 -rwxr-xr-x 1 josuah wheel 379 Apr 19 00:19 │ └─ stat Err bitreich.org 70 i 53 drwxr-xr-x 2 josuah wheel 512 Apr 19 15:41 └─ code Err bitreich.org 70 i 54 -rw-r--r-- 1 josuah wheel 1062 Apr 19 01:35 ├─ iomenu.md Err bitreich.org 70 i 55 -rw-r--r-- 1 josuah wheel 2492 Apr 19 15:41 └─ trees.md Err bitreich.org 70 i 56 Err bitreich.org 70 i 57 The parsing of ls is simple and mostly safe: to find the path name, it looks Err bitreich.org 70 i 58 for ' ./', which has no chance to occur ever on ls detail output. Err bitreich.org 70 i 59 Err bitreich.org 70 i 60 It have been tested with OpenBSD and busybox awk and ps. Err bitreich.org 70 i 61 Err bitreich.org 70 i 62 Err bitreich.org 70 i 63 tree Err bitreich.org 70 i 64 -------------------------------------------------------------------------------- Err bitreich.org 70 i 65 Err bitreich.org 70 i 66 The *tree* script is also provided as an example for generating a tree from a Err bitreich.org 70 i 67 find-style list. Err bitreich.org 70 i 68 Err bitreich.org 70 i 69 It reads a find-style text and convert it to a tree: Err bitreich.org 70 i 70 Err bitreich.org 70 i 71 % find . │ ./tree Err bitreich.org 70 .