LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   dd very strange. (https://www.linuxquestions.org/questions/linux-newbie-8/dd-very-strange-363568/)

bruse 09-15-2005 07:34 AM

dd very strange.
 
this one could be very strange.




linux:/home/student/Desktop # mount 1.iso 1 -o loop
linux:/home/student/Desktop # du 1
3 1/media.5
480910 1/suse/i586
215250 1/suse/noarch
696162 1/suse
696271 1 --------------------------------------------------------->>>see file size
linux:/home/student/Desktop # du 1.iso
1504 1.iso -------------------------------------------------------->>see file size.
linux:/home/student/Desktop #


one 1.5MB data is now 696.2MB of data?how is this?

blindcoder 09-15-2005 08:17 AM

If you downloaded the file then it might be incomplete. The iso9660 metadata is complete and telling you the files in that directory are actuall 600 MB in size but the ISO is incomplete and trying to access the file would fail.
You are free to try :)


Greetings,
Benjamin

bruse 09-15-2005 08:45 AM

no no no .
i have not downloaded anythink .
this this what i did.

#dd if=/dev/hdc of=1.iso count=3000

it extract's only 1.5 of data to my 1.iso.when i mount it it shows 680MB.It is really a strange.is not it?

blindcoder 09-15-2005 09:06 AM

no it is not strange. It is exactly the same as if you had only downloaded the first 1.5 MB. After that see my explanation above.

bruse 09-15-2005 09:13 AM

so is there any way to extract the first 150 MB of data from my full cd.
and also 150MB to 500MB of data using dd command.

blindcoder 09-15-2005 09:16 AM

mount it using -o loop and then start copying.

Besides, maybe it would be easier if you just told us what you want to achieve.

bruse 09-15-2005 09:30 AM

i want to copy a few MB's from my cd.but there is no virtual connection between my hdc and the data.( also i want to copy some portion of my
cd to my harddisk.)is this possible by dd or else any command.

blindcoder 09-15-2005 09:47 AM

why not just mount the cd and copy the files over?

AwesomeMachine 09-19-2005 01:21 AM

You use

dd if=/dev/hdc of=myfile.iso bs=2048 count=75000 conv=notrunc,noerror

This will extract about the first 150 MB. An iso9660 sector is 2048 bytes. This is a sector for sector copy.

bruse 09-19-2005 06:37 AM

what about copying 150 MB to 300 MB data of my cd.?thanks.


All times are GMT -5. The time now is 04:56 AM.