only delete space used by inode, on inode deletion; required
[unix-history] / usr / src / usr.sbin / ac / ac.8
.\" Copyright (c) 1980, 1991 Regents of the University of California.
.\" All rights reserved.
.\"
.\" %sccs.include.redist.man%
.\"
.\" @(#)ac.8 6.3 (Berkeley) %G%
.\"
.Dd
.Dt AC 8
.Os BSD 4
.Sh NAME
.Nm ac
.Nd display connect time accounting
.Sh SYNOPSIS
.Nm ac
.Op Fl d
.Op Fl p
.Op Fl w Ar file
.Op Ar users ...
.Sh DESCRIPTION
If the file
.Pa /var/log/wtmp
exists,
a record of individual
login and logout times are written to it by
.Xr init 8
and
.Xr login 8
respectively.
The program
.Nm ac
examines these
records and writes the accumulated connect time for all logins to the
standard output.
.Pp
Options available:
.Bl -tag -width people
.It Fl d
Display the connect times in 24 hour chunks.
.It Fl p
Display individual user totals.
.It Fl w Ar file
Read raw connect time data from
.Ar file
instead of the default file
.Pa /var/log/wtmp .
.It Ar users ...
Display totals for the given indiviuals
only.
.El
.Pp
If no arguments are given,
.Nm
displays the total amount of login time for all active accounts on the
system.
.Pp
The default
.Pa wtmp
file is an infinitely increasing file
unless frequently truncated. This is normally
done by the daily daemon scripts scheduled by
.Xr cron 8
which rename and rotate the
.Pa wtmp
files before truncating them (and keeping about a weeks worth on hand).
No login times are collected however, if the file does not exist.
.Sh FILES
.Bl -tag -width /var/log/wtmp.[0-7] -compact
.It Pa /var/log/wtmp
.It Pa /var/log/wtmp.[0-7]
rotated files
.El
.Sh SEE ALSO
.Xr init 8 ,
.Xr sa 8 ,
.Xr login 1 ,
.Xr utmp 5 .
.Sh HISTORY
A
.Nm
command appeared in Version 6 AT&T UNIX.