From owner-freebsd-stable@freebsd.org Thu Jun 8 08:10:42 2017 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5592BF921A for ; Thu, 8 Jun 2017 08:10:42 +0000 (UTC) (envelope-from dewaynegeraghty@gmail.com) Received: from mail-io0-x22a.google.com (mail-io0-x22a.google.com [IPv6:2607:f8b0:4001:c06::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AA6C478CB9 for ; Thu, 8 Jun 2017 08:10:42 +0000 (UTC) (envelope-from dewaynegeraghty@gmail.com) Received: by mail-io0-x22a.google.com with SMTP id i7so16980430ioe.1 for ; Thu, 08 Jun 2017 01:10:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=RISDYs8aMAzks78PdCQc4UK/CszisaAGSCN9uIFM/vA=; b=XEqO9ozAU2Z+KUO8LGjmlP5nJiQ9UNLfoaTWRFj13xzNb+uTI5fUZ61/Myrc4ox3ZC hvqnsx6yOY4/+njyp61wx+9vI98unV7/Ii2SbZU3firHT9FRfU2he/IHM+o8SVe8WBtq 0mXI3CKZwM1fAAr8wZo/u233YgjbQh1AyMcAqf86keHq6YLgwD55Erco0oR8uhIWIqjV M+tgnksn4vIIOXsHMAkx8xvi9VeE9HwU0axY/qQuPdPHuX2UTGQt3KoxSlAsB7L2e+jF Fz3sEbL0bHj+aS8MHLoU/AmZQ/zE5rxzjhqmZMYL7UFQeZVXWxEkd6KU/Be3Y2xtKaCh osiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=RISDYs8aMAzks78PdCQc4UK/CszisaAGSCN9uIFM/vA=; b=Z6kxfb8UGc17V2YCxHv/ZHLxWkPyKC84006pytsTjeBNyNvzGBChjmOF5LqVqkZ8bC TPnR0RMiuyGqkLns2KhDfIDI7g2p3n7RMtpayFQHUIn+OUWm4rY1eMR/Pj7eTq/uLIBm g4TVBUooswOicZ8RJzCe/eYI7XDDRe0+2PAqf6Xjhy8xT4aMzS5AwvUG29IbhlHA1Aje 8macpHww4RPuaJEvnAQKdOhveRk1BXljqyhQQ4fZyXi1lo5CX3QOrJDxelx8zFtTiIIx /MTFcLyqr9KuCtj1vMTbGX+F28H1RywFESaPgGc7urSwolMo7F4Xtz5rJJLV6EvqULqk /U3w== X-Gm-Message-State: AODbwcBGBuw2f7/IKxoPR7opw/Br7ltR07RofBTeaTXK/ViNDh2F7Ex+ RROrYPJYINnHTG0Sz8+1UojqsmuD3j13 X-Received: by 10.107.173.18 with SMTP id w18mr12682089ioe.80.1496909441804; Thu, 08 Jun 2017 01:10:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.27.74 with HTTP; Thu, 8 Jun 2017 01:10:11 -0700 (PDT) From: Dewayne Geraghty Date: Thu, 8 Jun 2017 18:10:11 +1000 Message-ID: Subject: dd is returning different content using same inputs To: freebsd-stable stable Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jun 2017 08:10:43 -0000 I'm attempting to skip the first three bytes of a file and then pull the header out of message. Please note the file size varies between 105 and 54 bytes, even though the input file and everything else remains constant, on FreeBSD hathor 11.1-PRERELEASE FreeBSD 11.1-PRERELEASE #0 r319562M: Mon Jun 5 03:13:08 AEST 2017 root@hathor:/110007/D/K8/hqdev-amd64-smp-vga amd64 1100514 1100514 # rm encheader;dd if=/tmp/tLbdoJ/encmessage bs=1 skip=3 | dd bs=384 count=1 of=encheader ; ls -lrth encheader 0+1 records in 0+1 records out 105 bytes transferred in 0.000026 secs (4071661 bytes/sec) -rw-r--r-- 1 root wheel 105B Jun 8 16:35 encheader # rm encheader;dd if=/tmp/tLbdoJ/encmessage bs=1 skip=3 | dd bs=384 count=1 of=encheader ; ls -lrth encheader 0+1 records in 0+1 records out 67 bytes transferred in 0.000026 secs (2554912 bytes/sec) -rw-r--r-- 1 root wheel 67B Jun 8 16:35 encheader # rm encheader;dd if=/tmp/tLbdoJ/encmessage bs=1 skip=3 | dd bs=384 count=1 of=encheader ; ls -lrth encheader 0+1 records in 0+1 records out 68 bytes transferred in 0.000024 secs (2867263 bytes/sec) -rw-r--r-- 1 root wheel 68B Jun 8 16:35 encheader # rm encheader;dd if=/tmp/tLbdoJ/encmessage bs=1 skip=3 | dd bs=384 count=1 of=encheader ; ls -lrth encheader 0+1 records in 0+1 records out 54 bytes transferred in 0.000025 secs (2167717 bytes/sec) -rw-r--r-- 1 root wheel 54B Jun 8 16:35 encheader # rm encheader;dd if=/tmp/tLbdoJ/encmessage bs=1 skip=3 | dd bs=384 count=1 of=encheader ; ls -lrth encheader 0+1 records in 0+1 records out 91 bytes transferred in 0.000024 secs (3751494 bytes/sec) -rw-r--r-- 1 root wheel 91B Jun 8 16:35 encheader I used this around May 8th (from a OS and ports rebuild on 4th May) and was performing some final testing on an 11.1 Prerelease built on Jun 5. This works correctly so perhaps I'm not using dd correctly? dd if=/tmp/tLbdoJ/encmessage skip=1 bs=3 | dd bs=1 count=384 of=encheader ; hd encheader|head -n1; ls -l encheader