]> git.pld-linux.org Git - projects/rc-scripts.git/blame - man/run-parts.8
update comment for kernel.sysrq
[projects/rc-scripts.git] / man / run-parts.8
CommitLineData
868bbbe0
ER
1.\" Hey, Emacs! This is an -*- nroff -*- source file.
2.\" Build-from-directory and this manpage are Copyright 1994 by Ian Jackson.
3.\" Changes to this manpage are Copyright 1996 by Jeff Noxon.
4.\" More
5.\"
6.\" This is free software; see the GNU General Public Licence version 2
7.\" or later for copying conditions. There is NO warranty.
8.TH RUN\-PARTS 8 "27 Jun 2012" "Debian"
9.SH NAME
10run\-parts \- run scripts or programs in a directory
11.SH SYNOPSIS
12.PP
13.B run\-parts
14[\-\-test] [\-\-verbose] [\-\-report] [\-\-lsbsysinit] [\-\-regex=RE]
15[\-\-umask=umask] [\-\-arg=argument] [\-\-exit\-on\-error] [\-\-help]
16[\-\-version] [\-\-list] [\-\-reverse] [\-\-] DIRECTORY
17.PP
18.B run\-parts
19\-V
20.SH DESCRIPTION
21.PP
22.B run\-parts
23runs all the executable files named within constraints described below, found
24in directory
25.IR directory .
26Other files and directories are silently ignored.
27
28If neither the \-\-lsbsysinit option nor the \-\-regex option is given
29then the names must consist entirely of ASCII upper- and lower-case
30letters, ASCII digits, ASCII underscores, and ASCII minus-hyphens.
31
32If the \-\-lsbsysinit option is given, then the names must not end
bf15f595 33in rpm backups (.rpmsave, .rpmnew, .rpmorig), and must
868bbbe0
ER
34belong to one or more of the following namespaces: the
35LANANA-assigned namespace (^[a\-z0\-9]+$); the LSB hierarchical and
36reserved namespaces (^_?([a\-z0\-9_.]+\-)+[a\-z0\-9]+$);
37and the Debian cron script namespace (^[a\-zA-Z0\-9_\-]+$).
38
39If the \-\-regex option is given, the names must match the custom
40extended regular expression specified as that option's argument.
41
42Files are run in the lexical sort order (according to the C/POSIX
43locale character collation rules) of their names unless the
44\-\-reverse option is given, in which case they are run in the
45opposite order.
46
47.SH OPTIONS
48.TP
49.B \-\-test
50print the names of the scripts which would be run, but don't actually run
51them.
52.TP
53.B \-\-list
54print the names of the all matching files (not limited to executables),
55but don't actually run them. This option cannot be used with --test.
56.TP
57.B \-v, \-\-verbose
58print the name of each script to stderr before running.
59.TP
60.B \-\-report
61similar to
62.BR \-\-verbose ,
63but only prints the name of scripts which produce output. The script's name is printed to whichever of stdout or stderr the script first produces output on.
64.TP
65.B \-\-reverse
66reverse the scripts' execution order.
67.TP
68.B \-\-exit\-on\-error
69exit as soon as a script returns with a non-zero exit code.
70.TP
71.B \-\-lsbsysinit
72use LSB namespaces instead of classical behavior.
73.TP
74.B \-\-new\-session
75run each script in a separate process session. If you use this option,
76killing run-parts will not kill the currently running script, it will
77run until completion.
78.TP
79.BI \-\-regex= RE
80validate filenames against custom extended regular expression
81.IR RE .
82See the EXAMPLES section for an example.
83.TP
84.BI "\-u, \-\-umask=" umask
85sets the umask to
86.I umask
87before running the scripts.
88.I umask
89should be specified in octal. By default the umask is set to 022.
90.TP
91.BI "\-a, \-\-arg=" argument
92pass
93.I argument
94to the scripts. Use
95.B --arg
96once for each argument you want passed.
97.TP
98.B "\-\-"
99specifies that this is the end of the options. Any filename after
100.B "\-\-"
101will be not be interpreted as an option even if it starts with a
102hyphen.
103.TP
104.B \-h, \-\-help
105display usage information and exit.
106.TP
107.B \-V, \-\-version
108display version and copyright and exit.
109
110.SH EXAMPLES
111.P
112Print the names of all files in /etc that start with `p' and end with `d':
113.P
114run-parts \-\-list \-\-regex \[aq]^p.*d$\[aq] /etc
115
116.SH COPYRIGHT
117.P
118Copyright (C) 1994 Ian Jackson.
119.P
120Copyright (C) 1996 Jeff Noxon.
121.P
122Copyright (C) 1996, 1997, 1998 Guy Maor
123.P
124Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Clint Adams
125
126.B run\-parts
127is free software; see the GNU General Public License version 2 or
128later for copying conditions. There is
129.I no
130warranty.
This page took 0.081355 seconds and 4 git commands to generate.