plstree

display ls or ps output as directory or process trees
Log | Files | Refs | README

commit e8122c7cbfd41489a923b76ba925b141c59e38ce
parent 35d52859f6fcd9f3d9e411584784f4ccd4b75b87
Author: Josuah Demangeon <mail@josuah.net>
Date:   Thu, 19 Apr 2018 04:23:54 +0200

add man pages and a Makefile

Diffstat:
AMakefile | 13+++++++++++++
Alstree.1 | 59+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apstree.1 | 64++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 136 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile @@ -0,0 +1,13 @@ +BIN = lstree pstree +MAN1 = lstree.1 pstree.1 + +all: + +README: $(MAN1) + mandoc -T utf8 $(MAN1) | col -bx >$@ + +install: + mkdir -p $(PREFIX)/bin + cp $(BIN) $(PREFIX)/bin + mkdir -p $(PREFIX)/share/man/man1 + cp $(MAN1) $(PREFIX)/share/man/man1 diff --git a/lstree.1 b/lstree.1 @@ -0,0 +1,59 @@ +.Dd $Mdocdate: April 19 2018$ +.Dt LSTREE 1 +.Os +. +. +.Sh NAME +. +.Nm lstree +.Nd list a tree of a directory with details +. +. +.Sh SYNOPSIS +. +.Nm progname +.Op Ar dir +. +. +.Sh DESCRIPTION +. +The +.Nm +list the content of +.Ar dir +recursively and format the output into a tree with details from +.Nm ls Fl l +. +. +.Sh EXAMPLES +. +.Bd -literal -offset 6n +drwxr-xr-x 3 josuah wheel 512 Apr 16 22:18 |- auth +-rw-r--r-- 1 josuah wheel 5 Apr 16 22:18 | |- authdom +-rw-r--r-- 1 josuah wheel 6 Apr 16 22:18 | |- authid +-rw-r--r-- 1 josuah wheel 3 Apr 16 22:18 | |- badusers +drwxr-xr-x 5 josuah wheel 512 Apr 16 22:18 | `- users +drwxr-xr-x 2 josuah wheel 512 Apr 16 22:18 | |- bootes +-rw-r--r-- 1 josuah wheel 5 Apr 16 22:18 | | |- expire +-rw-r--r-- 1 josuah wheel 2 Apr 16 22:18 | | `- status +drwxr-xr-x 2 josuah wheel 512 Apr 16 22:18 | `- sys +-rw-r--r-- 1 josuah wheel 5 Apr 16 22:18 | |- expire +-rw-r--r-- 1 josuah wheel 2 Apr 16 22:18 | `- status +-rwxr-xr-x 1 josuah wheel 112 Apr 16 22:18 |- pass +-rwxr-xr-x 1 josuah wheel 677 Apr 16 22:18 `- run +.Ed +. +. +.Sh SEE ALSO +. +.Xr find 1 , +.Xr lr 1 , +.Xr pstree 1 , +.Xr tree 1 , +.Lk https://github.com/chneukirchen/lr "list files, recursively" , +. +. +.Sh AUTHORS +. +.An Josuah Demangeon +.Aq Mt mail@josuah.net diff --git a/pstree.1 b/pstree.1 @@ -0,0 +1,64 @@ +.Dd $Mdocdate: April 19 2018$ +.Dt PSTREE 1 +.Os +. +. +.Sh NAME +. +.Nm pstree +.Nd list process tree as a tree +. +. +.Sh SYNOPSIS +. +.Nm pstree +. +. +.Sh DESCRIPTION +. +The +.Nm +utility list all processes with child-parent relationship displayed +as a tree, along with aditionnal details. +. +The +.Nm +utility uses the output of the +.Xr ps 1 +command as described by POSIX, and therefore do not require a +.Xr procfs 5 +to be mounted at +.Pa proc . +. +. +.Sh EXAMPLES +. +.Bd -literal -offset 6n + USER TTY PID STAT COMMAND + root ttyC1 52639 S |- runsvdir + root ?? 7250 Ss | |- runsv + root ?? 3235 S | | |- svlogd + root ?? 55053 I | | `- tcpserver + root ?? 35659 Ss | |- runsv + root ?? 13780 I | | |- quark + nobody ?? 31140 I | | | `- quark + root ?? 19006 S | | `- svlogd + root ?? 60341 Ss | `- runsv + root ?? 24271 S | `- svlogd + root ttyC1 65863 Is+p |- getty + root ttyC2 42115 Is+p `- getty +.Ed +. +. +.Sh SEE ALSO +. +.Xr lstree 1 , +.Xr ps 1 , +.Lk http://psmisc.sourceforge.net/ "Small utilities that use the /proc filesystem" , +.Lk http://www.thp.uni-duisburg.de/pstree/ "Minimal Homepage of pstree " +. +. +.Sh AUTHORS +. +.An Josuah Demangeon +.Aq Mt mail@josuah.net