[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: run-parts man ?
- To: Tzafrir Cohen <tzafrir(at-nospam)technion.ac.il>
- Subject: Re: run-parts man ?
- From: Shaul Karl <shaulka(at-nospam)bezeqint.net>
- Date: Sun, 08 Jul 2001 23:26:56 +0300
- cc: Ben-Nes Michael <miki(at-nospam)canaan.co.il>, linux ILUG <linux-il(at-nospam)linux.org.il>
- Delivered-To: linux.org.il-linux-il@linux.org.il
- In-Reply-To: Message from Tzafrir Cohen <tzafrir@technion.ac.il> of "Sun, 08 Jul 2001 16:59:58 +0300." <Pine.GSO.3.95-heb-2.07.1010708165501.5382V-100000@csd>
- References: <Pine.GSO.3.95-heb-2.07.1010708165501.5382V-100000@csd>
- Sender: linux-il-bounce(at-nospam)cs.huji.ac.il
> On Sun, 8 Jul 2001, Ben-Nes Michael wrote:
>
> > Hi All
> >
> > I sow "run-parts" in /etc/crontab, I guess it activate script script in
> > directory but im not sure.
> >
> > I tried my man system and other on the web with no success.
> >
> > Any one know where I can find the run-parts man or what it does ?
> >
> > man -K "run-parts" didn't helped either :(
>
> That is indeed a problem with the distro, but...
>
> $ which run-parts
> /usr/bin/run-parts
> [tzafrir@canada1 Mozilla]$ file `which run-parts
> $ file `which run-parts`
> /usr/bin/run-parts: Bourne-Again shell script text executable
> $ wc `which run-parts`
> 30 94 505 /usr/bin/run-parts
>
> Doesn't look as if it would be too hard to grasp on your own. Anyway,
> here's run-parts of my system:
> --------
> #!/bin/bash
>
> # run-parts - concept taken from Debian
>
> # keep going when something fails
> set +e
>
> if [ $# -lt 1 ]; then
> echo "Usage: run-parts <dir>"
> exit 1
> fi
>
> if [ ! -d $1 ]; then
> echo "Not a directory: $1"
> exit 1
> fi
>
> for i in $1/* ; do
> [ -d $i ] && continue
> # Don't run [KS]??foo.{rpmsave,rpmorig,rpmnew} scripts
> [ "${i%.rpmsave}" != "${i}" ] && continue
> [ "${i%.rpmorig}" != "${i}" ] && continue
> [ "${i%.rpmnew}" != "${i}" ] && continue
>
> if [ -x $i ]; then
> $i
> fi
> done
> -----------
>
> So basically it runs all the executables from a given directory
>
> --
> Tzafrir Cohen
> mailto:tzafrir@technion.ac.il
> http://www.technion.ac.il/~tzafrir
>
It look like this is distro dependant:
[23:10:59 tmp]$ locate run-parts
/bin/run-parts
/usr/share/man/man8/run-parts.8.gz
[23:12:44 tmp]$ file /bin/run-parts
/bin/run-parts: ELF 32-bit LSB executable, Intel 80386, version 1, dynamically linked (uses shared libs), stripped
[23:12:53 tmp]$ dpkg -S /bin/run-parts
debianutils: /bin/run-parts
run-parts.8.gz
Shaul Karl <shaulka@bezeqint.net>
Hillel used to say: If I am not for myself who will be for me?
Yet, if I am for myself only, what am I? And if not now, when?
(Ethics Of The Fathers 1:14)