manpagez: man pages & more
man notrail(1)
Home | html | info | man
notrail(1)                  General Commands Manual                 notrail(1)


NAME

       notrail - remove all trailing spaces characters from text files


SYNOPSIS

       notrail [-h(elp)] [-a(ll_whitespace)] [-f filelist] [-m max_filesize]
       [-p(ipe)] [-q(uiet)] [-v(erbose)] file...


DESCRIPTION

       notrail removes all trailing space characters from text files using
       Python's rstrip() method.


OPTIONS

       -h     Print help and quit.

       -a     Remove all trailing whitespace characters (spaces, tabs, etc.)
              instead of just spaces.

       -f file_list
              Read the names of files to be processed from the specified file.

       -m max_filesize
              Skip processing of files larger than the specified size to avoid
              running out of RAM.  The default value is 1073741824 bytes,
              i.e., 1 GiB.

       -p     Read the names of files to be processed from stdin.

       -q     Quiet output.  No output commentary will be printed.

       -v     Verbose output.  Commentary about unchanged files will be
              printed in addition to the normal commentary about changed
              files.


EXAMPLES

       Remove trailing spaces from a couple of files:
              notrail file01.txt file02.txt

       Remove trailing spaces from a large block of source code:
              find . -name "*.c" -print0 | xargs -0 notrail
              find . -name "*.h" -print0 | xargs -0 notrail


NOTES

       If notrail appears to be malfunctioning, try running it in single-
       threaded mode by using the -T 1 option.  This permits more meaningful
       error messages to be printed.


COPYRIGHT

       Copyright (C) 2004-2026 by Brian Lindholm.  This program is free
       software; you can use it, redistribute it, and/or modify it under the
       terms of the GNU General Public License as published by the Free
       Software Foundation; either version 3, or (at your option) any later
       version.

       This program 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 for more details.

littleutils                       2026 Jan 01                       notrail(1)

littleutils 1.4.0 - Generated Wed Feb 18 07:28:12 CST 2026
© manpagez.com 2000-2026
Individual documents may contain additional copyright information.