CHANGETRACK(1)

πŸ’– CHANGETRACK πŸ’–

okay bestie, welcome to changetrack(1) from the General Commands Manual β€” she's in section 1 and she's here to spill the tea on your files 🫢


✨ NAME ✨

changetrack β€” track changes to files 🌸


πŸŽ€ SYNOPSIS πŸŽ€

changetrack [-h] [-c configfile] [-d directory] [-e] [-r] [-q] [-m message] [-M message] [-v] [-u] [-o toaddress] [-f fromaddress]

πŸ¦‹ DESCRIPTION πŸ¦‹

so changetrack is literally a program that monitors changes to a bunch of files. here's the vibe: if some files get modified one day and then a few days later the machine starts acting up and working incorrectly, changetrack can hand you the info on which files were modified, and that helps you locate the problem. detective energy πŸ”βœ¨

normally changetrack uses ed to keep track of the various revisions of the files, by maintaining an .ed script with the change history for each file. very old-school, very iconic.

alternatively, changetrack can use rcs to keep track of the various revisions of the files. each file is "installed" in the rcs system the first time that changetrack is run after that file is added to the config file. whenever changetrack is run after that, a copy of the file is made, which is 'checked in' and implicitly 'checked out' of the rcs system. if you wanna retrieve an old version of the file, go read the man page of co. πŸ‘‘

backup files (ending in tilde ~) are ignored, unless they're explicitly included. no accidental backups sneaking into your tracking list, we don't do that here πŸ’…

okay and here's a cute one: after each pattern in the file list, if you add white space, a colon (:) then more whitespace, followed by email addresses, separated by more whitespace β€” the changes to that file get emailed to that address. all changes from each run are expressed in one email, so it's not gonna spam you forty times. using the email feature requires Mail::SendMail to be installed; and if it does not work correctly, an error message will be printed to standard error. rude but fair 😭


πŸ’… OPTIONS πŸ’…

  • -h β€” display a short help message, then exit. bye bestie πŸ‘‹
  • -cconfigfile β€” get the list of files to track from configfile instead of from ~/.changetrackrc (/etc/changetrack.conf for the super-user).
  • -doutputdirectory β€” store output in outputdirectory instead of in ~/.changetrack/ (/var/lib/changetrack/ for the super-user).
  • -e β€” keep a copy of the file from when it was first added to the changetrack configuration, and keep ed styled changes to rebuild the file. this option is recommended only if rcs does not work on the machine. to recover using this means, the .ed file should have the last several commands removed, to allow the file to be rebuilt to the appropriate state. a command like cat myfile.ed | ed myfile.original should be executed. yes, for real, that's the whole ritual πŸ•―οΈ
  • -r β€” disable the rcs facility.
  • -q β€” quiet mode; only print critical messages. good for scripts. main character silence ✨
  • -mmessage β€” print message on each file, after checking for any changes. good for indicating reboots or other system events.
  • -Mmessage β€” like -m, but message is only printed on modified files. selective, as she should be πŸ’…
  • -v β€” print version and exit.
  • -u β€” use unified diffs (this only works with some implementations of diff.
  • -oemailaddress β€” mail output to emailaddress. this is supplementary to emails specified in the config file.
  • -femailaddress β€” set "From" header to emailaddress, which must be fully qualified.

🌈 REQUIREMENTS 🌈

this program requires diff. unless the -r switch is used, this program requires rcs to be installed. if the -e switch is used, ed is required. like, no ed, no -e, no exceptions 🫢


πŸ“ FILES πŸ“

  • ~/.changetrackrc β€” list of files to monitor. each line may start with # indicating a comment. if a line is not a comment, it contains a file/pattern to monitor, and optionally " : " followed by any email addresses to send changes to. the filename may be a pattern described in the same way as for ls. Note: the default is /etc/changetrack.conf for root.
  • ~/.changetrack/ β€” default directory in which to store output information. the default is /var/lib/changetrack/ for root. all rcs files are stored in this directory, unless a subdirectory called RCS exists, in which case the rcs files are stored in that directory.
  • /etc/cron.daily/changetrack β€” script that creates the list of all files monitor.
  • /etc/cron.hourly/changetrack β€” script that invocates changetrack.
  • /etc/default/changetrack β€” configuration for the above two scripts.

πŸ” DIAGNOSTICS πŸ”

each filename is written to standard output. rcs will print errors if certain things go wrong. it will also print a few lines each time changetrack is run after a new file is added to the configuration. ngl, that's just her being chatty, it's fine πŸ’–


πŸ‘‘ IDENTIFICATION πŸ‘‘

  • Author: Cameron J. Morland.
  • Manual Page Revision: 2.1 Release Date: 2001-03-06.
  • Copyright Β© 2001-2005 Cameron J. Morland.
  • Changed by Jens Peter Secher to reflect the Debian modifications.

🌸 SEE ALSO 🌸

ed(1), rcsintro(1), co(1)


⭐ TODO ⭐

Automate removal of out-of-date changes, to save disk space and clarify the important changes. manifesting this fr fr ✨


πŸ’€ BUGS πŸ’€

None known. she's flawless, periodt πŸ’…


okay so that's the whole page bestie. now go track some files and slay πŸ¦‹

and that's a wrap on changetrack(1) from the General Commands Manual β€” Manual Page Revision 2.1, Release Date 2001-03-06 πŸ’– sending you off with so much love, go check your diffs πŸŽ€