From owner-freebsd-questions@freebsd.org Mon Jul 10 00:18:19 2017 Return-Path: Delivered-To: freebsd-questions@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 97410D99396 for ; Mon, 10 Jul 2017 00:18:19 +0000 (UTC) (envelope-from galtsev@kicp.uchicago.edu) Received: from cosmo.uchicago.edu (cosmo.uchicago.edu [128.135.20.71]) by mx1.freebsd.org (Postfix) with ESMTP id 70FE3752B5 for ; Mon, 10 Jul 2017 00:18:18 +0000 (UTC) (envelope-from galtsev@kicp.uchicago.edu) Received: by cosmo.uchicago.edu (Postfix, from userid 48) id 35CFBCB8CE9; Sun, 9 Jul 2017 19:18:12 -0500 (CDT) Received: from 76.193.16.95 (SquirrelMail authenticated user valeri) by cosmo.uchicago.edu with HTTP; Sun, 9 Jul 2017 19:18:12 -0500 (CDT) Message-ID: <52627.76.193.16.95.1499645892.squirrel@cosmo.uchicago.edu> In-Reply-To: <888578F8-AD68-4993-823C-152789F3C929@mail.sermon-archive.info> References: <888578F8-AD68-4993-823C-152789F3C929@mail.sermon-archive.info> Date: Sun, 9 Jul 2017 19:18:12 -0500 (CDT) Subject: Re: Unusual Question From: "Valeri Galtsev" To: "Doug Hardie" Cc: "freebsd-questions@freebsd.org Questions" Reply-To: galtsev@kicp.uchicago.edu User-Agent: SquirrelMail/1.4.8-5.el5.centos.7 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jul 2017 00:18:19 -0000 On Sun, July 9, 2017 4:57 am, Doug Hardie wrote: > I have a FreeBSD 9.3 remote server that needs to be purged. I know that > rm -rf / will remove all the directory entries, but I need to write over > the drive. I thought that dd if=/dev/zero of=/dev/ada0 might do the > trick, If you were able to execute this, it still will not do the trick. What will happen is the following: the command at some point will descend into /dev and will delete block device / filesystem lives on, and after that point the command will just fail. I have vague recollection that that was one of the tricky questions on some sysadmin exam (Linux probably). I knew someone who actually did that on multi-user box he administered (space just snuck in after leading slash of absolute path). I happened to help him: we just mounted partitions on another machine and apart from /bin /boot and portion of /dev all still was there, so it was nothing like the disaster on can picture from nasty appearance of this command. Someone at some point mentioned that rm command goes into directories and subdirectories NOR in alphabetical order, so I left that out, but in incident I mention nothing but what alphabetically is before the device / filesystem lives on (/dev/hda2 was our case I believe) was lost. I hope, you had fun reading this ;-) Valeri > but it gives an not permitted error. The whole thing can crash and > burn at the end. This is an unmanned site so moving drives is not viable. > _______________________________________________ > freebsd-questions@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org" > ++++++++++++++++++++++++++++++++++++++++ Valeri Galtsev Sr System Administrator Department of Astronomy and Astrophysics Kavli Institute for Cosmological Physics University of Chicago Phone: 773-702-4247 ++++++++++++++++++++++++++++++++++++++++