Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I'm trying trying to understand dd, and I'd like to know why frequently do we have to use a block read/write size, like "dd bs=1024", "dd ibs=512"...
If it executes the operation byte by byte, isn't it irrelevant? What is this block size then?
It's not necessary to read one byte, write one byte. It's not effective. Much more efficient to read a block bs, then write it. The result is the same. speed is highter. that takes advantage of a HDD buffer
The short answer to your question is: the blocksize that you select for a specific dd task depends on what sort of medium (Floppy, CD, usb, firewire drives etc., and sometimes their file systems dictate a specific choice) you write from or to. Also it can be worth experimenting with larger blocksizes when copying one partition to another - but be aware that this sometimes depends on your hardware (disk drives, and processor and RAM).
Hope this helps - post back here if you still have questions and we will wake the AwesomeMachine
If I recall correctly, dd defaults to a block size of 512. As already suggested, block devices (eg disk drives) are most efficient when they get date in blocks.
Suppose you need to move 500 bricks across the street. Carrying them over 1 at a time would take a long time. Much more efficient to put them in a wheelbarrow--say 50 at a time. If you have a big wheelbarrow--and you are quite strong--you could take them in one load.
If you just need to move them a few feet, you can just throw them one at a time---now you're operating more as a serial device.
Wow, thanks for the answers! That guide is quite good!
So, if I got it right, the cbs/ibs/bs is just limited by my RAM? Or is it my hardware (HD...)?
I'm confused about finding the right values of sectors/cylinders/heads of a HD with LBA. If, for example, my HD has 230Gb, how do I find the correct number of cylinders and sectors? Divide 230x1024x1024x1024 bytes by 512x63x255 to get the number of cylinders? 16065 times that for sectors?