Sponsored Content
Full Discussion: dd bytesize
Top Forums UNIX for Advanced & Expert Users dd bytesize Post 302515191 by Corona688 on Tuesday 19th of April 2011 11:01:00 AM
Old 04-19-2011
Quote:
Originally Posted by programAngel
regarding the second use "To match the block size of a device", who can I know the block size of a device?
like for example my hard disk
Depends on your system, which you haven't said, but most drives these days have either 512-byte or 4096-byte sectors. But the block size isn't quite so relevant these days; the OS talks to the drive, and the OS knows the block size, so won't mess up. And you can pick a block size in the megabytes to make transfers more efficient, by doing more per read/write cycle..
This User Gave Thanks to Corona688 For This Post:
 
BLOCKDEV(8)						      System Manager's Manual						       BLOCKDEV(8)

NAME
blockdev - call block device ioctls from the command line SYNOPSIS
blockdev [options] commands devices blockdev --report [devices] DESCRIPTION
The utility blockdev allows one to call block device ioctls from the command line. OPTIONS
-V Print version and exit. -q Be quiet. -v Be verbose. --report Print a report for devices. Note that the partition StartSec is in 512-byte sectors. COMMANDS
--setro Set read-only. --setrw Set read-write. --getro Get read-only. Print 1 if the device is read-only, 0 otherwise. --getss Print sectorsize in bytes - usually 512. --getbsz Print blocksize in bytes. --setbsz N Set blocksize to N bytes. --getsize Print device size in sectors (BLKGETSIZE). Deprecated in favor of the --getsz option. --getsize64 Print device size in bytes (BLKGETSIZE64) --getsz Get size in 512-byte sectors (BLKGETSIZE64 / 512). --setra N Set readahead to N 512-byte sectors. --getra Print readahead (in 512-byte sectors). --setfra N Set filesystem readahead (same like --setra on 2.6 kernels). --getfra Get filesystem readahead. --flushbufs Flush buffers. --rereadpt Reread partition table. AUTHOR
blockdev was written by Andries E. Brouwer. AVAILABILITY
The blockdev command is part of the util-linux-ng package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/. Jun 2007 BLOCKDEV(8)
All times are GMT -4. The time now is 07:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy