LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Unexpected dd of=file size reported by ls (https://www.linuxquestions.org/questions/slackware-14/unexpected-dd-of%3Dfile-size-reported-by-ls-4175598916/)

GrumpyGnome 02-03-2017 01:39 PM

Unexpected dd of=file size reported by ls
 
Hello,
I am running Slack 14.2 x64 and am practically a zero time slacker. The install is very stock; no updates or net connection.

I want to make a 1MiB image file from a section of a 2TB disk with no partition (/dev/sdc) starting at 1.6TiB's. Here is what I have tried:

Code:

bash-4.3# dd if=/dev/sdc of=1600GB-1MiB.dd bs=4096 seek=391130026 count=257
257+0 records in
257+0 records out
1052672 bytes (1.1 MB, 1.0 MiB) copied, 0.201666 s, 5.2 MB/s
bash-4.3# ls -l
total 4948
-rw-r--r-- 1 root root 1602069639168 Feb  3 10:57 1600GB-1MiB.dd
drwxr-xr-x 2 root root          4096 Feb  1 21:43 rawout
-rw-r--r-- 1 root root      2000828 Feb  1 22:19 rawout.dd
-rw-r--r-- 1 root root      2000828 Feb  1 21:54 rawout.zip
-rw-r--r-- 1 root root            2 Jan 31 02:48 test.txt
bash-4.3#

I think 'ls' is saying my outfile size is 1.6TB.
The dd only wrote 1.0 MiB.
This became an issue when I needed to move the file to my 64GB flash drive and 'mv' says the disc is full :(
Anyone see what I did wrong?

Happy Trails

TracyTiger 02-03-2017 02:02 PM

Try using "skip" instead of "seek". See "man dd".

GrumpyGnome 02-03-2017 06:15 PM

Thanks Tracy I just wasn't seeing it.


All times are GMT -5. The time now is 11:42 PM.