From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 640FB1382C5 for ; Mon, 22 Jun 2020 20:29:51 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F2B99E0976; Mon, 22 Jun 2020 20:29:45 +0000 (UTC) Received: from mail-ot1-x330.google.com (mail-ot1-x330.google.com [IPv6:2607:f8b0:4864:20::330]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id AFCE3E0964 for ; Mon, 22 Jun 2020 20:29:45 +0000 (UTC) Received: by mail-ot1-x330.google.com with SMTP id d4so14291862otk.2 for ; Mon, 22 Jun 2020 13:29:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:openpgp:autocrypt:message-id:date :user-agent:mime-version:in-reply-to; bh=mz7ZUw8j2g+AuDdZchOv/pW0xKUA2y0vxd2Qy6KAJx4=; b=NAzJRYvYtN87pRJcC18Lg3/Q4e+nnIr+xbfbZ2DZRQnCb7XpjIr/wF8n/w7xEDJOUy blfvIm4hUpB0mYq3WpucvdoCeQMzqvZI0wQi9lELCURbC8SosFE/ng1T3K/AZu8IjdmP t6ejcjGvykCOeCsSU4Cb/yc/uM0vxbeyvxwbBzhygC6dFrolqq4yQU/d3rv7sfFfeZWl YGp7fxKZuPRdfsN9WxUnJnsNXzwKTMNzsO+twuKN9/jxDHnHtuFZcHPQHx9g947JsQ39 rTlvITz0GhBr5puDFx6t0JHZ/GGa2zv8cPQ6kQ3jINvs9jOlIm0NHc4WMrQ84bmI972M R77w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to; bh=mz7ZUw8j2g+AuDdZchOv/pW0xKUA2y0vxd2Qy6KAJx4=; b=NczkBC0Br2jNqMZwNLfHJb/oVr2zt9oxPenwyQOqfSRYN0YMf/74n3RxBuJsIQqQi6 ioGZ8mjuV30GstDfLirvl0lhhDQDOhVBqXxSZw0L/iswp/uCZgVWZmaL7wWXraOk5cTJ NXXLkt5sasJzonCmP0lWwqmY4n9WQ3DXWxUjcN4ZUMh1tx1MSG6GNGz3xrFPHj7fa/5V 784GnrMp0ZQyYXK/fF6lQ6+EE1gYZq0Fz/ghB02jrqgalGpggKLxF27glj5wBtYVoT6y W/zRZ0mH3FxY917rGUxd3IMmdcc19STyWphHKb4GEHcKzCKeQJNadTMWxApQS9ysD0g0 EjAw== X-Gm-Message-State: AOAM530QsLGPhrlfZHhlSgahLzIGwBPGgGHzDuVLG5arW2RTuRz33j5c a780Tcfxt8Lbz09wJNS8ffwrmnjy X-Google-Smtp-Source: ABdhPJyfRNP+JcRBXv8osQpCnuzURcrqt9vJt+qTGVCSAiqfxBNWeC6oIiDIGldPR/3wa/3Wi30LUw== X-Received: by 2002:a9d:6d0a:: with SMTP id o10mr2479478otp.160.1592857784928; Mon, 22 Jun 2020 13:29:44 -0700 (PDT) Received: from [192.168.0.100] (adsl-074-188-241-018.sip.asm.bellsouth.net. [74.188.241.18]) by smtp.gmail.com with ESMTPSA id v2sm3500252oib.26.2020.06.22.13.29.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Jun 2020 13:29:43 -0700 (PDT) Subject: Re: [gentoo-user] Testing a used hard drive to make SURE it is good. To: gentoo-user@lists.gentoo.org References: <6d77acb3-5754-06cb-b8ef-2f1a5d7d8084@gmail.com> <20200615231836.xje3kkkihsxrvhaz@grusum.endjinn.de> <91bbab90-88b1-47ac-3c80-a8a842b5b48f@gmail.com> <20200622191024.5djoxb4aroowwb6t@grusum.endjinn.de> From: Dale Openpgp: preference=signencrypt Autocrypt: addr=rdalek1967@gmail.com; prefer-encrypt=mutual; keydata= mQINBFxc7MgBEAC+zrgEdqJJiDe/UDAB+ScmferXWfJTVjbVT2T4DQ7jiLrgP9aNUo1HioNF mrU3JPOCR32gvZyTbY1+niO5+VSo/+pSqQ785h6ZDj1klMkrg6tEzGnf2MNBpBj4houZwxQ+ WDKKTg2M9F+lv8wTIdR/JQn+hSviktLMtrghQlyLhpapsLXWLA6gMFebpQYwxUwemvan8ddX lQvJe9FGyFYvBi0dp1gl10F2O+DVZJxvX8xkX+yImVlhVJiC31gXHRcj+Qlo7gprlU7TIieF Uow6/ZvYKJ26pztVdFCg5w0rMJkF/x8Zd4A6wnuptiAPmWaQ1+YKgYDonbDUgwqFSx5/lN5z DGZ4LlioxeUTTPVvZsqBIeDz6jNFA583OYbo1/S26dqrvTFf2DKlsvoDpVfAhNlwJPjoixs0 X3FNqPv+M10n4kq5Iz7Q9E3O4s/nfFIYGocEslVka7zZPkXSaHbsn+KJlY8XV6qxtCEdh0/V XX1+1aU2J74M0JikWhpwxTZ1dP5aOyWSPPEgFFIRW6xwwC02SoRH9a7mggfGYp/YjPlONNaT SCL8sgRfvmq3D0XTbLyTjSbExxkfKDmbePQagawDE3TlI/oivHf1JaAcbwMb3LZuU4TGcOIl 5D+x7q0MUIeCop0ZFOwAnqW3AVVNvsBkv2KN+IHJryWAf0/iMQARAQABtBtEYWxlIDxyZGFs ZWsxOTY3QGdtYWlsLmNvbT6JAk4EEwEIADgWIQTZ7suruPBaS60bCYXvEM/XWu+ZnAUCXFzs yAIbIwULCQgHAgYVCgkICwIEFgIDAQIeAQIXgAAKCRDvEM/XWu+ZnN+7D/4/1dNG4aCz0+v+ 0dcjV5tY1feYEWCdHKyDzxWBxlCpd/0NPRQeNY4VMjbCl/sq7GkXi/c2SbfWDQ5BQRkkExG1 pSwuXSIehGok/4fpTi3HDAguRv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uhGrPpqR/91wrFc4E1260GKauSr4UhMJv6tygBwyC0mmBMKi+ZXw6ZdZxA5fg7y 35P3TILjznCXXTDgRHq9A3NknKRMcgFacX6eIhANkMFo6oJVjuEgy1dvu1wFfDq7c+i8GAHu L4pYzyXYu6PporlNNU0xSwdVgzM/uuK0lt+UxCimgC+YR3IezgDcbfudb7h9dGIwL+bbPL0A EQEAAYkCNgQYAQgAIBYhBNnuy6u48FpLrRsJhe8Qz9da75mcBQJcXOzIAhsMAAoJEO8Qz9da 75mcXZ4P/1YXgWDZek7mhzrf6uaQzMxa92P89HeWz4PlgB/32symeEFAV04WazzBZffI8AYY rGA1Xmu/2VaB9+FOODyKhUWBc2UL0NRWBk6POwboyTdKlclmpixaN9zLcBt0YLejoRfN1B/5 aQf9/lUDZMnAiCyz0FgeqEMUshldmwWC35RqnjrCbbuk2vIqSH6BLDIXU6jQrLHE1DF0ai41 wLtQFAFXPhn45n0ZwYhVs4Z32z4sjXrIvgBgCaXa4HM+L1Klne0KiNM8ReFTTpTE0SgyDOSZ O3MOa2n77i6JbVtsbiFYnNeP3J9S/l3jevGpZEtNQOKrIm1MW8jGuHWtsDeMkT/mCcSodlkt PxIo+mMK9GpGvG2hW80LiohqNfUbNwAmr3blOYY4URPXPRnEnPs4pmTmL5owjw2dkg145i9I D42Tq+XZ6YtWt3SGzGbAYow6XwTwZ5NFAzV9UQuCGrDw4KWan6O6Z+VIYWsn0UMZlu1Obxna aocofkaUCbISK26kImuD1aA8juSHC18Qv1xUage6/UakbSxyDtACqt6hOVFKX3IA59ApdNRT +2x3iCmlvF9MJsGgFq6IpqL+Fk7iWV8Kjbz0wQOId6N9+JdQh3LrLaS7a1PowUm1z9DK5/O0 Yg+gpDnEOOFI7WM5u7a7FSM2Z/LXGVwel/0eWvLk9tN6 Message-ID: <103d7dff-92ff-70e4-df40-d72d22def16b@gmail.com> Date: Mon, 22 Jun 2020 15:29:42 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0 SeaMonkey/2.53.2 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 In-Reply-To: <20200622191024.5djoxb4aroowwb6t@grusum.endjinn.de> Content-Type: multipart/alternative; boundary="------------79DFA6C94C58AEB048A8179C" X-Archives-Salt: 1e7bcd8a-ebcd-4796-ba10-7f7a591c1bd7 X-Archives-Hash: 86f275a970198dc1c988a94941541f9b This is a multi-part message in MIME format. --------------79DFA6C94C58AEB048A8179C Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 8bit David Haller wrote: > Hello, > > On Thu, 18 Jun 2020, Dale wrote: >> David Haller wrote: > [..] >>> Compile with: >>> gcc $CFLAGS -o ones ones.c >>> or >>> gcc $(portageq envvar CFLAGS) -o ones ones.c >>> >>> and use/test e.g. like >>> >>> ./ones | dd of=/dev/null bs=8M count=1000 iflag=fullblock > [..] >> I got it to compile, at least it created a file named ones anyway.  What >> I'm unclear about, where is the if= for dd in the command?  All the >> commands I've seen before has a if= and a of=.  The if for input and of >> for output or target. > ==== man 1 dd ==== > if=FILE > read from FILE instead of stdin > [..] > of=FILE > write to FILE instead of stdout > ==== > > note the stuff after 'instead' ;) So it is piped in with the | thingy?  Got it.  >> I'm assuming that if I want to target sdb, I'd >> replace null with /dev/sdb.  > Yes. > >> As I've posted before, even my scripting skills are minimal.  Surprised >> I got it to compile even. > Well, you could copy & paste and on gentoo, there is bound to be a > 'gcc' ;) Yea, just my skills on that sort of thing is minimal or none.  I do copy and paste pretty well tho.  ;-)  >> something.  I placed all this in the /root directory.  I'm assuming I >> can copy paste the commands above while in /root to make it work? > Yes. Or put 'ones' in /root/bin/ or even /usr/local/bin. Depending on > if you expect to use the program later on. But if it's just for this > once it's fine in /root/ alongside the sourcecode. > > HTH, > -dnh > Well, I made notes in my frequent commands file.  It may be rare that I use it but when I do, maybe the notes will help.  Maybe.  ;-) Thanks much. Dale :-)  :-)  --------------79DFA6C94C58AEB048A8179C Content-Type: text/html; charset=ISO-8859-15 Content-Transfer-Encoding: 8bit
David Haller wrote:
Hello,

On Thu, 18 Jun 2020, Dale wrote:
David Haller wrote:
[..]
Compile with:
    gcc $CFLAGS -o ones ones.c
or
    gcc $(portageq envvar CFLAGS) -o ones ones.c

and use/test e.g. like

    ./ones | dd of=/dev/null bs=8M count=1000 iflag=fullblock
[..]
I got it to compile, at least it created a file named ones anyway.  What
I'm unclear about, where is the if= for dd in the command?  All the
commands I've seen before has a if= and a of=.  The if for input and of
for output or target.
==== man 1 dd ====
       if=FILE
              read from FILE instead of stdin
[..]
       of=FILE
              write to FILE instead of stdout
====

note the stuff after 'instead' ;)

So it is piped in with the | thingy?  Got it. 



      
I'm assuming that if I want to target sdb, I'd
replace null with /dev/sdb. 
Yes.

As I've posted before, even my scripting skills are minimal.  Surprised
I got it to compile even.
Well, you could copy & paste and on gentoo, there is bound to be a
'gcc' ;)

Yea, just my skills on that sort of thing is minimal or none.  I do copy and paste pretty well tho.  ;-) 



      
something.  I placed all this in the /root directory.  I'm assuming I
can copy paste the commands above while in /root to make it work?
Yes. Or put 'ones' in /root/bin/ or even /usr/local/bin. Depending on
if you expect to use the program later on. But if it's just for this
once it's fine in /root/ alongside the sourcecode.

HTH,
-dnh



Well, I made notes in my frequent commands file.  It may be rare that I use it but when I do, maybe the notes will help.  Maybe.  ;-)

Thanks much.

Dale

:-)  :-) 
--------------79DFA6C94C58AEB048A8179C--