run-parts command
觀看 help
執行
$ run-parts --help
或是執行
$ run-parts -h
顯示
Usage: run-parts [OPTION]... DIRECTORY
--test print script names which would run, but don't run them.
--list print names of all valid files (can not be used with
--test)
-v, --verbose print script names before running them.
--report print script names if they produce output.
--reverse reverse execution order of scripts.
--exit-on-error exit as soon as a script returns with a non-zero exit
code.
--lsbsysinit validate filenames based on LSB sysinit specs.
--new-session run each script in a separate process session
--regex=PATTERN validate filenames based on POSIX ERE pattern PATTERN.
-u, --umask=UMASK sets umask to UMASK (octal), default is 022.
-a, --arg=ARGUMENT pass ARGUMENT to scripts, use once for each argument.
-V, --version output version information and exit.
-h, --help display this help and exit
觀看版本
執行
$ run-parts --version
或是執行
$ run-parts -V
顯示
Debian run-parts program, version 4.7
Copyright (C) 1994 Ian Jackson, Copyright (C) 1996 Jeff Noxon.
Copyright (C) 1996,1997,1998,1999 Guy Maor
Copyright (C) 2002-2012 Clint Adams
This is free software; see the GNU General Public License version 2
or later for copying conditions. There is NO warranty.
觀看 manpage
執行
$ whatis run-parts
顯示
run-parts (8) - run scripts or programs in a directory
執行
$ man run-parts
會看到「說明」。
查詢 run-parts 放在那個位置
執行
$ whereis run-parts
顯示
run-parts: /bin/run-parts /usr/share/man/man8/run-parts.8.gz
執行
$ which run-parts
顯示
/bin/run-parts
執行
$ type run-parts
顯示
run-parts is /bin/run-parts
查詢 run-parts 屬於那個套件
執行
$ dpkg -S /bin/run-parts
或是執行
$ dpkg -S $(which run-parts)
顯示
debianutils: /bin/run-parts
表示「/bin/run-parts」是屬於「run-parts」這個套件。
使用範例
執行
$ run-parts --list /etc/X11/Xsession.d/
顯示
/etc/X11/Xsession.d//00upstart
/etc/X11/Xsession.d//20x11-common_process-args
/etc/X11/Xsession.d//30x11-common_xresources
/etc/X11/Xsession.d//35x11-common_xhost-local
/etc/X11/Xsession.d//40x11-common_xsessionrc
/etc/X11/Xsession.d//50x11-common_determine-startup
/etc/X11/Xsession.d//55xfce4-session
/etc/X11/Xsession.d//56xubuntu-session
/etc/X11/Xsession.d//60x11-common_localhost
/etc/X11/Xsession.d//60x11-common_xdg_path
/etc/X11/Xsession.d//60xbrlapi
/etc/X11/Xsession.d//60xdg-user-dirs-update
/etc/X11/Xsession.d//65snappy
/etc/X11/Xsession.d//70gconfd_path-on-session
/etc/X11/Xsession.d//70im-config_launch
/etc/X11/Xsession.d//75dbus_dbus-launch
/etc/X11/Xsession.d//90gpg-agent
/etc/X11/Xsession.d//90qt-a11y
/etc/X11/Xsession.d//90x11-common_ssh-agent
/etc/X11/Xsession.d//95dbus_update-activation-env
/etc/X11/Xsession.d//99upstart
/etc/X11/Xsession.d//99x11-common_start