These programs are minor utilities used by various parts of
C News.
_S_p_a_c_e_f_o_r determines how many files of size _f_i_l_e_s_i_z_e can fit
in _l_o_c_a_t_i_o_n (iiiinnnnccccoooommmmiiiinnnngggg, aaaarrrrttttiiiicccclllleeeessss, ccccoooonnnnttttrrrroooollll, aaaarrrrcccchhhhiiiivvvveeee, or oooouuuutttt----
bbbboooouuuunnnndddd to _s_i_t_e) without cramping things unduly. The precise
locations of these places, and how low space gets before it
is unduly cramped, are site-specific. _S_p_a_c_e_f_o_r invokes
_d_f(1) to determine the available space.
_Q_u_e_u_e_l_e_n reports how many news batches _u_u_c_p has queued up
for _s_i_t_e.
_S_i_z_e_o_f reports the total number of bytes in the _f_i_l_e(s).
(This may seem redundant with _l_s -_l, but the format of _l_s -_l
varies between systems and _s_i_z_e_o_f looks after all that.)
_C_t_i_m_e and _g_e_t_d_a_t_e convert dates in human-readable form to
(_g_e_t_d_a_t_e) and from (_c_t_i_m_e) decimal ASCII representations of
Unix's internal integer dates. Their functionality resem-
bles that of their namesakes in the C library.
_N_e_w_s_h_o_s_t_n_a_m_e reports the name of this system for news pur-
poses. This may differ from the name of the particular CPU
it is run on; a cluster of CPUs sharing a filesystem tree
would all have the same _n_e_w_s_h_o_s_t_n_a_m_e name. Typically
_n_e_w_s_h_o_s_t_n_a_m_e gets the name from /_u_s_r/_l_i_b/_n_e_w_s/_w_h_o_a_m_i; fail-
ing that, it consults various other possible sources (e.g.
Sun Microsystems Last change: 13 Jan 1990 1
NEWSAUX(8) MAINTENANCE COMMANDS NEWSAUX(8)
the _h_o_s_t_n_a_m_e command).
_G_n_g_p resembles _g_r_e_p except that its search is based on news-
group patterns (e.g. `comp', which matches `comp',
`comp.lang', `comp.lang.c', ...; `comp,!comp.lang.c' which
matches `comp' and `comp.lang' but not `comp.lang.c'; etc.).
_G_n_g_p prints only the line(s) that contain a substring that
matches the _n_g_p_a_t_t_e_r_n. Normally the substring must run from
a point in the line to its end. If the ----aaaa flag is given,
the eligible substrings start at the beginning of the line
and end at white space or the end of the line. The ----rrrr flag
reverses the inputs, with patterns coming from the file and
the argument taken as the line(s).
_C_a_n_o_n_h_d_r takes the concatenation of its input _f_i_l_e(s) (stan-
dard input if none) as an article, and outputs the header
from the article with header keywords canonicalized for
easier processing. Canonicalization forces all alphabetics
to lower case except the first letter of each (hyphen-
separated) word in the keyword, which is forced to upper
case. (One exception: ``Message-ID'' is the canonical form
of [e.g.] ``message-id''.)
_N_e_w_s_l_o_c_k makes a link named _l_o_c_k_n_a_m_e to the file _l_o_c_k_t_e_m_p,
and returns exit status 0 for success, 1 if the link could
not be made (typically because _l_o_c_k_n_a_m_e already existed).
This is used for shell-file locking in C News. It is a sub-
set of _l_n(1) except that (a) no error messages are ever pro-
duced and (b) the link is guaranteed to fail if _l_o_c_k_n_a_m_e
already exists. (Some brain-damaged versions of _l_n help-
fully remove _l_o_c_k_n_a_m_e in that case, making them useless for