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 180311382C5 for ; Mon, 22 Jun 2020 19:10:41 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2C4A2E0952; Mon, 22 Jun 2020 19:10:35 +0000 (UTC) Received: from km35626.keymachine.de (text-idiomas.com [87.118.86.27]) (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 C181FE0874 for ; Mon, 22 Jun 2020 19:10:33 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by km35626.keymachine.de (Postfix) with ESMTP id 94EB51132B09 for ; Mon, 22 Jun 2020 21:10:31 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at km35626.keymachine.de. Received: from km35626.keymachine.de ([127.0.0.1]) by localhost (km35626.keymachine.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gNqjouvMmUXr for ; Mon, 22 Jun 2020 21:10:30 +0200 (CEST) Received: from grusum.endjinn.de (99-175-142-46.pool.kielnet.net [46.142.175.99]) by km35626.keymachine.de (Postfix) with ESMTPSA id 61681112A762 for ; Mon, 22 Jun 2020 21:10:30 +0200 (CEST) Received: by grusum.endjinn.de (Postfix, from userid 500) id AF2A217004A; Mon, 22 Jun 2020 21:09:58 +0200 (CEST) Date: Mon, 22 Jun 2020 21:10:24 +0200 From: David Haller To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Testing a used hard drive to make SURE it is good. Message-ID: <20200622191024.5djoxb4aroowwb6t@grusum.endjinn.de> Mail-Followup-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> 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 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <91bbab90-88b1-47ac-3c80-a8a842b5b48f@gmail.com> Organization: Nah, not today! X-Clacks-Overhead: GNU Terry Pratchett User-Agent: NeoMutt/20170609 (1.8.3) X-Archives-Salt: ebef6238-eb33-4aa3-b397-891a91ad8404 X-Archives-Hash: 235b8bdd9130a3a6954ca5a04e26b6de 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=3D/dev/null bs=3D8M count=3D1000 iflag=3Dfullblock [..] >I got it to compile, at least it created a file named ones anyway.=A0 What >I'm unclear about, where is the if=3D for dd in the command?=A0 All the >commands I've seen before has a if=3D and a of=3D.=A0 The if for input and= of >for output or target. =3D=3D=3D=3D man 1 dd =3D=3D=3D=3D if=3DFILE read from FILE instead of stdin [..] of=3DFILE write to FILE instead of stdout =3D=3D=3D=3D note the stuff after 'instead' ;) >I'm assuming that if I want to target sdb, I'd >replace null with /dev/sdb.=A0 Yes. >As I've posted before, even my scripting skills are minimal.=A0 Surprised >I got it to compile even. Well, you could copy & paste and on gentoo, there is bound to be a 'gcc' ;) >something.=A0 I placed all this in the /root directory.=A0 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 --=20 BUGS It is not yet possible to change operating system by writ=AD ing to /proc/sys/kernel/ostype. -- Linux sysctl(2) manpage