freespace
Package: WA2L/edrc 1.5.57
Section: Library Commands (3)
Updated: 20 September 2008
Index
Return to Main Contents
NAME
freespace - print freespace of a directory
SYNOPSIS
edrc/lib/freespace
[
-h
]
freespace
[
-b
|
-k
|
-m
|
-g
]
-d directory
AVAILABILITY
WA2L/edrc
DESCRIPTION
return the available free space of the filesystem
where the given directory resides on.
The free space is returned as an integer number of the
selected unit option.
If a more precise free space size is needed for units other
then Bytes (
-b
) the size has to
be queried in Bytes first and then the related calculation
has to be done separately:
freespace -d /data |\
awk '{printf("%3.2f\n", $1/1024)}'
OPTIONS
- -h
-
print usage message.
- -b
-
return the free space in Bytes, this is also the default
if no unit option is specified.
- -k
-
return the free space in kilo bytes (1 kByte = 1024 Byte).
- -m
-
return the free space in mega bytes (1 MByte = 1024 kByte).
- -g
-
return the free space in giga bytes (1 GByte = 1024 MByte).
- -d directory
-
path of the directory from where the free space should
be returned.
ENVIRONMENT
-
EXIT STATUS
- 0
-
no error.
- 1
-
given directory does not exist.
- 2
-
operating system does not exist. See
osid(3)
if you get this error.
- 4
-
usage message printed.
FILES
-
EXAMPLES
-
SEE ALSO
edrcintro(1)
filesize(3),
bdf(1),
df(1)
NOTES
-
BUGS
-
AUTHOR
freespace was developed by Christian Walther. Send suggestions
and bug reports to wa2l@users.sourceforge.net .
COPYRIGHT
Copyright © 2008
Christian Walther
This is free software; see
edrc/doc/COPYING
for copying conditions. There is ABSOLUTELY NO WARRANTY; not
even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
This document was created by man2html
using the manual pages.
Time: 16:53:02 GMT, August 28, 2024