sizeof - output the size of one or more files

Description:

This program outputs the size (in bytes) of one or more specified files. Optionally, it can also display the name of the file (the default is to output only the file size) and the total size of all the specified files.

Usage:

        sizeof [-h | --help] [-v] [-t] file...

Options:

        -h, --help      Display this help message and exit.
        -v              Verbose mode.  Outputs file name in addition to
                        file size.
        -t              Total size of specified files.

Examples:

        sizeof *.txt

Lists the sizes of each of the specified files.

        sizeof -t *.txt

Lists the total size (in bytes) of all of the specified files.

        sizeof -v *.txt

Lists both the size and the name of each of the specified files.

Installation:

Just put it someplace useful. How about /usr/local/bin?

Tested With:

Tested with Red Hat v5.2 and 7.2. Should work with bash anywhere. Uses awk and printf.

Copyright:

Copyright 2000-2002, William Shotts <bshotts@users.sourceforge.net>

This software is part of the LinuxCommand.org project, a site for Linux education and advocacy devoted to helping users of legacy operating systems migrate into the future.

You may contact the LinuxCommand.org project at:

        http://www.linuxcommand.org

License:

This program 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 of the License, 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.

$Id: sizeof.README,v 1.2 2002/02/18 14:18:38 bshotts Exp $