Sponsored Content
Top Forums UNIX for Beginners Questions & Answers How do I determine the best number to use for the bs (block size) operand of the dd command? Post 303011936 by apmcd47 on Friday 26th of January 2018 04:42:43 AM
Old 01-26-2018
Quote:
Originally Posted by Quenz

I don't quite follow you here. I guess dd stands for dump something? All I knew is the command is able to make bootable media.
I've always thought it stood for "Disk to Disk" or "Disk Dump". The Wikipedia page for dd mentions the JCL language's DD command. I would say the origins of the name are lost in time.
Quote:
I appreciate the suggestion, but I'm looking for a bit more of an explanation. I want to be able to work out an optimal number by myself.

You said 512(M?) would be slow. What about 256? What about 1M? What about 8M? I've seen various suggestions, but not much explanation.

Hopefully that makes sense.
Presumably as the original use of dd was for copying data between devices the block size is that of the target device. If you have the Gnu stat command on your system you could use that to determine the block size of your USB. I put an 8Gb USB drive and a 32Gb drive in my system and got this:
Code:
$ stat -f -c"%s" /media/apm/24F4-1B66 # 8GB volume
4096
$ stat -f -c"%s" /media/apm/F170-2ADC # 32GB volume
16384

In actual fact the man page for stat says:
Code:
       %s     block size (for faster transfers)

Andrew
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

determine the size of a file???

Hello, Can someone please tell me which command to use to determine the size of a file? When I log in to my shell account, I do this $>% ls -als total 632 8 -rw-r--r-- 1 user01 devgrp1 1558 Jul 30 23:25 .kshrc What is "1158"? Bytes? Kilobytes? I apologize if my... (8 Replies)
Discussion started by: alan
8 Replies

2. HP-UX

determine number of xterm connected

i more than one hp-ux 11.0 application server. some of these application server has an xterminal attached to them. ncd900 and ncd400. i would like to know how many xterm is connected to an application server. without physically checking each xterm, can i identify how many xterm? thanks alot. (0 Replies)
Discussion started by: inquirer
0 Replies

3. Shell Programming and Scripting

$A is a number / any other string? How to determine ?

I have a variable (say $A) and while passing it gets either a number or some other string. Now how can test (with if else) whether the variable is just a ne or something else ? Thanks a lot to all in advance C Saha (2 Replies)
Discussion started by: csaha
2 Replies

4. UNIX for Advanced & Expert Users

How to determine the max file size

Does anyone know a way to determine the maximum filesize on a file system on Solaris, HP-UX, AIX, Linux, and OSF1 using the command line? TIA (2 Replies)
Discussion started by: dknight
2 Replies

5. HP-UX

determine the physical size of the hard disk

Hi is there a cmd in hpux 11 to determine the physical size of the hard disk. not bdf command. i have searched the other threads here but cant find an answer. thank you guys (4 Replies)
Discussion started by: hoffies
4 Replies

6. UNIX for Dummies Questions & Answers

Determine switch buffer size

Hi everybody, I need to calculate the tcp buffer size of a network switch, since it's not specified in the manual; how do I do this? I have some machines connected to the switch and I can run some socket tests written in C between these machines (I can choose how many bytes to send and... (0 Replies)
Discussion started by: dimpim
0 Replies

7. Shell Programming and Scripting

determine the number of spaces

Here is a weird question :) i am trying to create a script written in bash that will create configuration files for nagios. As some of you aware is has to be written in the below format: define service{ option1 value1 option2 value2... (6 Replies)
Discussion started by: ppolianidis
6 Replies

8. UNIX for Dummies Questions & Answers

Command for total number of files (and size) across subdirectories?

Hi all... I have a directory called dbrn. This directory contains an unknown number of subdirectories which in turn contain an unknown number of files. What I want to know is: How many files with extention .ABC can be found in /dbrn across all subdirecties, and what is the total size for... (9 Replies)
Discussion started by: Beun
9 Replies

9. Programming

Perl : Inline program to determine file size

Hi, I have 5 files as below $ ll sam* -rw-rw-rw- 1 sam ugroup 0 Mar 21 06:06 sam3 -rw-rw-rw- 1 sam ugroup 0 Apr 3 22:41 sam2 -rw-rw-rw- 1 sam ugroup 17335 Apr 10 06:07 sam1 -rw-rw-rw- 1 sam ugroup 5 Apr 10 07:53 sam5 -rw-rw-rw- 1 sam ugroup 661 Apr 10 08:16 sam4 I want to list out... (4 Replies)
Discussion started by: sam05121988
4 Replies

10. Programming

How to extract operand size in bits of a C program?

Hi I'm new to shell programming. How do I extract the size of an operand in a simple instruction in a C program? Lets say there is an addition a+b somewhere in a C code where a and b are integers. How to extract the size of a & b in bits? Is there something called intermediate code before an... (4 Replies)
Discussion started by: beginner_99
4 Replies
xfs_rtcp(8)						      System Manager's Manual						       xfs_rtcp(8)

NAME
xfs_rtcp - XFS realtime copy command SYNOPSIS
xfs_rtcp [ -e extsize ] [ -p ] source ... target DESCRIPTION
xfs_rtcp copies a file to the realtime partition on an XFS filesystem. If there is more than one source and target, the final argument (the target) must be a directory which already exists. OPTIONS
-e extsize Sets the extent size of the destination realtime file. -p Use if the size of the source file is not an even multiple of the block size of the destination filesystem. When -p is specified xfs_rtcp will pad the destination file to a size which is an even multiple of the filesystem block size. This is necessary since the realtime file is created using direct I/O and the minimum I/O is the filesystem block size. SEE ALSO
xfs(5), mkfs.xfs(8), mount(8). CAVEATS
Currently, realtime partitions are not supported under the Linux version of XFS, and use of a realtime partition WILL CAUSE CORRUPTION on the data partition. As such, this command is made available for curious DEVELOPERS ONLY at this point in time. xfs_rtcp(8)
All times are GMT -4. The time now is 03:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy