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