lintex(1)

๐Ÿ’… lintex โ€” the manual page, but make it slay โœจ

okay bestie, welcome to the lintex(1) glow-up ๐ŸŽ€ this is the General Commands Manual entry for lintex, and by the end of this you're gonna be cleaning up your TeX mess like the icon you are ๐Ÿ‘‘


๐ŸŒธ NAME ๐ŸŒธ

lintex โ€” removes TeX-related garbage files ๐Ÿ—‘๏ธโœจ


โœจ SYNOPSIS โœจ

lintex [ -i ] [ -r ] [ -b ext ] [ -p ]  [ -k ] [ -o ] [ -q ] [ -v ] [ -d
]  [ dir [ dir ... ]]

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

okay so picture this: you just ran TeX, everything worked, and now your folder is littered with little auxiliary files that you literally do not need anymore. lintex is the bestie that comes through and deletes them โ€” we're talking log, aux, dvi, ... files, the whole lil entourage ๐Ÿ’–

but bestie, it's not feral about it. it's selective ๐Ÿ‘ a file only actually gets removed if:

  • its modification timestamp is more recent than the timestamp of the related TeX source, and
  • it isn't readonly

and on top of that? all the backup files your fave editor generated get swept up too. main character energy, but make it tidy ๐ŸŒˆ


๐Ÿ’… OPTIONS ๐Ÿ’…

  • -i โ€” asks you for permission before it actually removes any file. consent queen ๐Ÿ‘‘
  • -r โ€” the given directories get scanned recursively; like, if they contain any subdirectory structure, the whole tree gets cleaned up ๐ŸŒณโœจ
  • -b ext โ€” ext is the trailer string (the "extension") that identifies the backup files your editor makes, e.g. -b .bak. ext defaults to ~ (the tilde character), which is the emacs convention. if ext includes characters that mean something special to the shell, you gotta wrap it in quotes: e.g. -b "~" (which is equivalent to the default). and if you specify the null string, like -b "", that inhibits the cleanup of any special file ๐Ÿšซ
  • -p โ€” pretends; shows you what files would be removed but doesn't actually remove them. a dress rehearsal, no cap ๐Ÿ’ƒ
  • -k โ€” keeps final documents (<cyan>.pdf, <cyan>.ps, <cyan>.dvi) ๐Ÿซถ
  • -o โ€” permits the removal of files older than their sources. chaotic, but allowed ๐Ÿ™ˆ
  • -q โ€” quiet; only prints error messages ๐Ÿคซ
  • -v โ€” verbose; prints which files were removed and which weren't. the receipts, bestie ๐Ÿงพ
  • -d โ€” debug; prints the answers to all of life's questions ๐Ÿ”ฎ๐Ÿ’€

๐ŸŽ€ PARAMETERS ๐ŸŽ€

  • dir โ€” the name(s), separated by whitespace, of one or more directories to be cleaned. if it's missing, the default is the current directory ๐Ÿ“‚

๐Ÿ”ฅ EXTENSIONS THAT GET REMOVED ๐Ÿ”ฅ

all files ending in the following extensions may be removed when appropriate:

.aux, .bbl, .bcf, .blg, .dvi, .idx, .ilg, .ind, .lof, .log, .lot,
.nav, .out, .pdf, .ps, .snm, .thm, .toc, .toc.old, .synctex.gz, .xyc

๐ŸŒˆ ENVIRONMENT ๐ŸŒˆ

the HOME environment variable determines the location of the configuration file โ€” see FILES below ๐Ÿ‘‡


๐Ÿงš FILES ๐Ÿงš

you can create a configuration file at $HOME/.lintexrc which optionally contains the keys remove-exts and keep-exts, each followed by a Python style list of extensions to additionally remove or keep, respectively. every extension must be preceded by a period โ€” like ".pdf" and not "pdf" โš ๏ธ

the keep-exts key is only used when the keep option (-k) is passed. heads up: the extensions listed in the keep-exts field replace the defaults used by the -k option. and keep-exts also takes precedence over remove-exts: no file ending in an extension removed by default or listed in remove-exts will be deleted if its extension is listed in keep-exts and the -k option was passed. ๐Ÿ’–

for example, this configuration file:

keep-exts = [".pdf", ".ps", ".log"];
remove-exts = [".txt", ".1"];

will keep any file ending in ".pdf", ".ps" or ".log" when lintex is called with the -k option (but not files ending in ".dvi"), and adds ".txt" and ".1" to the list of extensions to check for removal. and the following configuration file provides lintex with its default behaviour:

keep-exts = [".pdf", ".ps", ".dvi"];
remove-exts = [];

๐Ÿ’€ BUGS ๐Ÿ’€

lintex cannot handle extensions containing periods โ€” for example, ".toc.old" and ".synctex.gz" โ€” since it splits filenames at the last period to find the extension, treating "foo.toc.old" as the file "foo.toc" with the extension ".old". yeah. it's giving lowercase-l-lowercase-l ๐Ÿซ 


๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

lintex was written by Maurizio Loreti <Maurizio_Loreti@gmail.com> between 1996 and 2002 โœ๏ธ

as of 2010, lintex is maintained by Ryan Kavanagh <rak@debian.org>. it features several extensions/bug fixes. feel free to email him with your comments and suggestions โ€” he said it, not me ๐Ÿซถ


Copyright ยฉ 1996โ€“2002 Maurizio Loreti <Maurizio_Loreti@gmail.com>

Copyright ยฉ 2010โ€“2015 Ryan Kavanagh <rak@debian.org>

lintex is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ๐Ÿ’œ

lintex is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. see the GNU General Public License (here included in the file COPYING), for more details.


and that's the whole page, bestie!! this was lintex version 1.14, dated 08 February 2015 โ€” go forth and clean your TeX folders, you absolute icon ๐ŸŒŸ๐Ÿ’–๐ŸŽ€