Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ctob(9) [netbsd man page]

CTOD(9) 						   BSD Kernel Developer's Manual						   CTOD(9)

NAME
ctod -- macros related to bytes, pages, and disk blocks SYNOPSIS
#include <sys/param.h> size ctod(size x); size dtoc(size x); size ctob(size x); size btoc(size x); size dbtob(size x); size btodb(size x); DESCRIPTION
The ctod family of macros can be used to convert between bytes, pages (``clicks''), and disk blocks. The following table lists the possible conversions: Macro From To ctod() pages disk blocks dtoc() disk blocks pages ctob() pages bytes btoc() bytes pages dbtob() disk blocks bytes btodb() bytes disk blocks These are typical macros that may appear with different names in other operating systems. Examples include btop() and btopr() in Solaris. SEE ALSO
param(3) HISTORY
Some of these macros appeared in Version 7 AT&T UNIX. CAVEATS
The described macros make no assumptions about the type of the input parameter. A caller should ensure that neither integer overflow nor integer underflow are possible. BSD
April 8, 2011 BSD

Check Out this Related Man Page

PARAM(3)						   BSD Library Functions Manual 						  PARAM(3)

NAME
param -- common parameters SYNOPSIS
#include <sys/param.h> size MAX(size a, size b); size MIN(size a, size b); DESCRIPTION
The <sys/param.h> header includes some common definitions and macros specific to NetBSD. The header is perhaps best characterized as a ker- nel equivalent of <sys/types.h>. The following list summarizes the provided definitions and macros. o First and foremost, the header defines the version of NetBSD. This is defined as #define __NetBSD_Version__ 599004800 /* 5.99.48 */ The general format is ``MMmmrrpp00'', where 'MM' and 'mm' denote the major and minor version, respectively, 'rr' is provided for compatibility, and 'pp' defines the patch level. o Common utility macros such as MAX() and MIN() as well as more specific macros such as STACK(9), ctod(9), mstohz(9), roundup(9), and setbit(9). o Numerous miscellaneous definitions such as limits, constants for the kernel memoryallocators(9), scale factors used by the sched- uler, kthread(9) priorities, and many others. o Definitions provided for historical and compatibility reasons. Examples range from definitions such as ``#define BSD'' to old pri- ority levels used in the kernel. SEE ALSO
bitops(3), cdefs(3), types(3), unistd(3) HISTORY
A <param.h> header appeared already in the Version 4 AT&T UNIX. BSD
April 10, 2011 BSD
Man Page

8 More Discussions You Might Find Interesting

1. Solaris

Cant boot solaris9 after October patches

Hello! I applied the solaris9 "recomended and sequrity"-bundle Oktober release last night, and after that the system will not boot. I missed to reboot the system using "reboot -r", but I am able to mount the root disk by booting from cdrom "cdrom -s". Please advise! These are the last... (3 Replies)
Discussion started by: sap4ever
3 Replies

2. The Lounge

UNIX/Linux Forums Post Of The Week 41, October, 2009

(0 Replies)
Discussion started by: Linux Bot
0 Replies

3. What is on Your Mind?

UNIX/Linux Forums Post Of The Week 41, October, 2009

Which post should win this weeks UNIX/Linux post of the week nomination contest? Choose from the posts listed throughout the forum(s), and vote for your favorite post now. What is Topic Of The Week? Post of the Week is a contest that select posts which we would like the community to... (8 Replies)
Discussion started by: Linux Bot
8 Replies

4. What is on Your Mind?

UNIX/Linux Forums Post Of The Week 42, October, 2009

Which post should win this weeks UNIX/Linux post of the week nomination contest? Choose from the posts listed throughout the forum(s), and vote for your favorite post now. What is Topic Of The Week? Post of the Week is a contest that select posts which we would like the community to... (0 Replies)
Discussion started by: Linux Bot
0 Replies

5. What is on Your Mind?

UNIX/Linux Forums Post Of The Week 43, October, 2009

Which post should win this weeks UNIX/Linux post of the week nomination contest? Choose from the posts listed throughout the forum(s), and vote for your favorite post now. What is Topic Of The Week? Post of the Week is a contest that select posts which we would like the community to... (0 Replies)
Discussion started by: Linux Bot
0 Replies

6. What is on Your Mind?

UNIX/Linux Forums Post Of The Week 44, October, 2009

Which post should win this weeks UNIX/Linux post of the week nomination contest? Choose from the posts listed throughout the forum(s), and vote for your favorite post now. What is Topic Of The Week? Post of the Week is a contest that select posts which we would like the community to... (0 Replies)
Discussion started by: Linux Bot
0 Replies

7. UNIX for Beginners Questions & Answers

Listing files from October 4th is not accurate

Good evening: Need your help please Before deleting older logs from octobre 4th i need to identify which files i have to remove, for instance today is octobre 8ht, i need to remove files from October 4th Because there are many files i can not list because error args too long, so ... (5 Replies)
Discussion started by: alexcol
5 Replies

8. UNIX for Beginners Questions & Answers

Compress and logging files from October 6th in a loop

Good night, i need your help please Because there are about 10000 files from October 6th, i need to to compress but i use this command and it does not do anything, in the prompt has no respones and i have to press CRTL+C to goback to the shell for file in $(ls -l | grep "Impres" | grep "Oct ... (4 Replies)
Discussion started by: alexcol
4 Replies