From 5651a7db51de791b55f6ece31c29969de7483e20 Mon Sep 17 00:00:00 2001 From: hjp Date: Tue, 11 Jan 2000 13:24:36 +0000 Subject: [PATCH] First release --- tiny/GNUmakefile | 12 ++++++++++++ tiny/dus | 2 ++ tiny/fnp | 3 +++ tiny/fnpa | 2 ++ tiny/fnpc | 2 ++ tiny/fqdn | 9 +++++++++ tiny/isodate | 2 ++ tiny/psg | 9 +++++++++ 8 files changed, 41 insertions(+) create mode 100644 tiny/GNUmakefile create mode 100755 tiny/dus create mode 100755 tiny/fnp create mode 100755 tiny/fnpa create mode 100755 tiny/fnpc create mode 100755 tiny/fqdn create mode 100755 tiny/isodate create mode 100755 tiny/psg diff --git a/tiny/GNUmakefile b/tiny/GNUmakefile new file mode 100644 index 0000000..2c4febe --- /dev/null +++ b/tiny/GNUmakefile @@ -0,0 +1,12 @@ +include GNUmakevars +install: \ + $(BINDIR)/dus \ + $(BINDIR)/fnp \ + $(BINDIR)/fnpa \ + $(BINDIR)/fnpc \ + $(BINDIR)/fqdn \ + $(BINDIR)/isodate \ + $(BINDIR)/psg \ + + +include GNUmakerules diff --git a/tiny/dus b/tiny/dus new file mode 100755 index 0000000..e2c740d --- /dev/null +++ b/tiny/dus @@ -0,0 +1,2 @@ +#!/bin/sh +du -k -x $@ | sort -n | tail -100 diff --git a/tiny/fnp b/tiny/fnp new file mode 100755 index 0000000..bb984e9 --- /dev/null +++ b/tiny/fnp @@ -0,0 +1,3 @@ +#!/bin/sh +find "$@" -printf "%TY-%Tm-%Td %TH:%TM:%TS %5k %-8u %-8g %m %p\n" + diff --git a/tiny/fnpa b/tiny/fnpa new file mode 100755 index 0000000..b3552f6 --- /dev/null +++ b/tiny/fnpa @@ -0,0 +1,2 @@ +#!/bin/sh +find "$@" -printf "%AY-%Am-%Ad %AH:%AM:%AS %5k %-8u %-8g %p\n" diff --git a/tiny/fnpc b/tiny/fnpc new file mode 100755 index 0000000..b56de28 --- /dev/null +++ b/tiny/fnpc @@ -0,0 +1,2 @@ +#!/bin/sh +find "$@" -printf "%CY-%Cm-%Cd %CH:%CM:%CS %5k %-8u %-8g %p\n" diff --git a/tiny/fqdn b/tiny/fqdn new file mode 100755 index 0000000..b783fdd --- /dev/null +++ b/tiny/fqdn @@ -0,0 +1,9 @@ +#!/bin/sh +[ $# -ge 2 ] && { echo "Usage: $0 [hostname]" >&2; exit 1 } +if [ $# -eq 1 ] +then + hostname=$1 +else + hostname="`/bin/hostname`" +fi +/usr/bin/nslookup $hostname | /bin/grep Name: | /bin/sed -e 's/.* *//' diff --git a/tiny/isodate b/tiny/isodate new file mode 100755 index 0000000..0cf1c0d --- /dev/null +++ b/tiny/isodate @@ -0,0 +1,2 @@ +#!/bin/sh +date '+%Y-%m-%dT%H:%M:%S' diff --git a/tiny/psg b/tiny/psg new file mode 100755 index 0000000..d4f0ece --- /dev/null +++ b/tiny/psg @@ -0,0 +1,9 @@ +#!/bin/sh +case `uname` in +Linux) + ps auxww | grep "$1" + ;; +HP-UX) + ps -ef | grep "$1" + ;; +esac