Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

getbsize(3) [mojave 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

Check Out this Related Man Page

GETBSIZE(3)						   BSD Library Functions Manual 					       GETBSIZE(3)

NAME
getbsize -- get user block size LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <stdlib.h> char * getbsize(int *headerlenp, long *blocksizep); DESCRIPTION
The getbsize() function determines the user's preferred block size based on the value of the ``BLOCKSIZE'' environment variable; see environ(7) for details on its use and format. 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. If the user's block size is unreasonable, a warning message is written to standard error and the returned information reflects a block size of 512 bytes. SEE ALSO
df(1), du(1), ls(1), systat(1), environ(7) HISTORY
The getbsize() function first appeared in 4.4BSD. BSD
June 4, 1993 BSD
Man Page

6 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

How do you display summary of disk usage?

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)
Discussion started by: klannon
3 Replies

2. AIX

Block Size

Hi, I try to change the block size from 512 to 0, but it send this message: 0514-068 Cause not know Can someone help me whith this? (3 Replies)
Discussion started by: Ruben78
3 Replies

3. UNIX for Advanced & Expert Users

how to find default OS block size?

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)
Discussion started by: prasi_in
1 Replies

4. UNIX for Dummies Questions & Answers

file size

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)
Discussion started by: kkalyan
2 Replies

5. Red Hat

systat

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)
Discussion started by: farash
9 Replies

6. Shell Programming and Scripting

Small fast question

just to confirm du from sh show sizes as multiples of 512 byte right? (4 Replies)
Discussion started by: Nick1097
4 Replies