Add 't' and 'p' postfixes to dd(1).
MFC after: 1 month Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
66d082c84b
commit
e53d0abf73
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=295261
@ -383,6 +383,14 @@ postfix_to_mult(const char expr)
|
|||||||
case 'g':
|
case 'g':
|
||||||
mult = 1 << 30;
|
mult = 1 << 30;
|
||||||
break;
|
break;
|
||||||
|
case 'T':
|
||||||
|
case 't':
|
||||||
|
mult = (uintmax_t)1 << 40;
|
||||||
|
break;
|
||||||
|
case 'P':
|
||||||
|
case 'p':
|
||||||
|
mult = (uintmax_t)1 << 50;
|
||||||
|
break;
|
||||||
case 'W':
|
case 'W':
|
||||||
case 'w':
|
case 'w':
|
||||||
mult = sizeof(int);
|
mult = sizeof(int);
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
.\" @(#)dd.1 8.2 (Berkeley) 1/13/94
|
.\" @(#)dd.1 8.2 (Berkeley) 1/13/94
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.\"
|
.\"
|
||||||
.Dd August 28, 2014
|
.Dd February 4, 2016
|
||||||
.Dt DD 1
|
.Dt DD 1
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -332,10 +332,13 @@ If the number ends with a
|
|||||||
.Dq Li k ,
|
.Dq Li k ,
|
||||||
.Dq Li m ,
|
.Dq Li m ,
|
||||||
.Dq Li g ,
|
.Dq Li g ,
|
||||||
|
.Dq Li t ,
|
||||||
|
.Dq Li p ,
|
||||||
or
|
or
|
||||||
.Dq Li w ,
|
.Dq Li w ,
|
||||||
the
|
the
|
||||||
number is multiplied by 512, 1024 (1K), 1048576 (1M), 1073741824 (1G)
|
number is multiplied by 512, 1024 (1K), 1048576 (1M), 1073741824 (1G),
|
||||||
|
1099511627776 (1T), 1125899906842624 (1P)
|
||||||
or the number of bytes in an integer, respectively.
|
or the number of bytes in an integer, respectively.
|
||||||
Two or more numbers may be separated by an
|
Two or more numbers may be separated by an
|
||||||
.Dq Li x
|
.Dq Li x
|
||||||
|
Loading…
Reference in New Issue
Block a user