GETBSIZE(3) BSD Library Functions Manual GETBSIZE(3)NAME
getbsize -- get preferred block size
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <stdlib.h>
char *
getbsize(int *headerlenp, long *blocksizep);
DESCRIPTION
The getbsize() function returns a preferred block size for reporting by system utilities df(1), du(1), ls(1) and systat(1), based on the
value of the BLOCKSIZE environment variable. BLOCKSIZE may be specified directly in bytes, or in multiples of a kilobyte by specifying a
number followed by ``K'' or ``k'', in multiples of a megabyte by specifying a number followed by ``M'' or ``m'' or in multiples of a gigabyte
by specifying a number followed by ``G'' or ``g''. Multiples must be integers.
Valid values of BLOCKSIZE are 512 bytes to 1 gigabyte. Sizes less than 512 bytes are rounded up to 512 bytes, and sizes greater than 1 GB
are rounded down to 1 GB. In each case getbsize() produces a warning message.
The getbsize() function returns a pointer to a null-terminated string describing the block size, something like ``1K-blocks''. The memory
referenced by headerlenp is filled in with the length of the string (not including the terminating null). The memory referenced by
blocksizep is filled in with block size, in bytes.
SEE ALSO df(1), du(1), ls(1), systat(1), environ(7)HISTORY
The getbsize() function first appeared in 4.4BSD.
BSD November 16, 2012 BSD
Check Out this Related Man Page
GETBSIZE(3) BSD Library Functions Manual GETBSIZE(3)NAME
getbsize -- get preferred block size
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <stdlib.h>
char *
getbsize(int *headerlenp, long *blocksizep);
DESCRIPTION
The getbsize() function returns a preferred block size for reporting by system utilities df(1), du(1), ls(1) and systat(1), based on the
value of the BLOCKSIZE environment variable. BLOCKSIZE may be specified directly in bytes, or in multiples of a kilobyte by specifying a
number followed by ``K'' or ``k'', in multiples of a megabyte by specifying a number followed by ``M'' or ``m'' or in multiples of a gigabyte
by specifying a number followed by ``G'' or ``g''. Multiples must be integers.
Valid values of BLOCKSIZE are 512 bytes to 1 gigabyte. Sizes less than 512 bytes are rounded up to 512 bytes, and sizes greater than 1 GB
are rounded down to 1 GB. In each case getbsize() produces a warning message.
The getbsize() function returns a pointer to a null-terminated string describing the block size, something like ``1K-blocks''. The memory
referenced by headerlenp is filled in with the length of the string (not including the terminating null). The memory referenced by
blocksizep is filled in with block size, in bytes.
SEE ALSO df(1), du(1), ls(1), systat(1), environ(7)HISTORY
The getbsize() function first appeared in 4.4BSD.
BSD November 16, 2012 BSD
I am trying to create a command string that makes use of the du or df utilities to show block count in kilobytes (1024 bytes) instead of multiples of 512 bytes, any suggestions? Thanks..... (3 Replies)
Hi
Can someone please guide me on how to get the default block size for
all unix flavors.
As per my investigation its 512 for all unix flavours other than HP for which it is 1024.However I am not sure on this.
I even tried the df ommand but utt gives the output w.r.t file system created but... (1 Reply)
What is difference between du -s and ls -l file size?
I guess du will give in multiple of 512 bytes? correct me if iam wrong.
And is wc -c and ls -l are same?
and if we create a through cat testfile > testfile.copy
and when we try to find the file size by du -s test*
it is showing the both... (2 Replies)
what does the fields in /etc/cron.d/systat mean?
my systat file contains
# Run system activity accounting tool every 10 minutes
*/10 * * * * root /usr/lib/sa/sa1 -S DISK 1 1
# 0 * * * * root /usr/lib/sa/sa1 -S DISK 600 6 &
# Generate a daily summary of process accounting at 23:53
53 23 * *... (9 Replies)