From owner-freebsd-questions@freebsd.org Sun Jul 1 20:31:54 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9600EFDAE9E for ; Sun, 1 Jul 2018 20:31:54 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.135]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E9C0D7CB5C for ; Sun, 1 Jul 2018 20:31:53 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de ([92.195.97.38]) by mrelayeu.kundenserver.de (mreue003 [212.227.15.167]) with ESMTPA (Nemesis) id 0MF8bn-1fKXVq2ce3-00GLjT; Sun, 01 Jul 2018 22:31:45 +0200 Date: Sun, 1 Jul 2018 22:31:44 +0200 From: Polytropon To: Paul Schmehl Cc: FreeBSD Questions Subject: Re: Problem deleting files Message-Id: <20180701223144.d331ae10.freebsd@edvax.de> In-Reply-To: <85B4CFC22AC0CA70B917D42D@Pauls-MacBook-Pro.local> References: <85B4CFC22AC0CA70B917D42D@Pauls-MacBook-Pro.local> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:uFv3wCy8DvGV+FXbDWoPD6Dss0QmIQOI411wSYVIrPSQxqLjMfb lDhGPQixJBldtnLD5Rkox1uc+uTmiPApHuqxsoSknoBgiqAeeyKOiHUMnwisS3NHUPpU9te Ffqj8586+9euzt3QRkEF3NwtXydqQMp/g7T+CGrOLvfoJVQF+oSkFVvk+zHNePn4kbgCeH+ lhcMipDY/lvXtbhJ01yIA== X-UI-Out-Filterresults: notjunk:1;V01:K0:fxsiKxq9LGI=:7OM32uCUmetRK54DqFGvCt Ta623p6sePviyUKVntzldDSvUOFrWMBl7d8+dtWhUUR5jcyp1IBI+G+tUrVl62SKlwB+8splU vzEkUnOTA/YZD1VvQWIdOqP121CUNyFIoCsUszInneu3PcfUZZ5U1BA9byQ2YWAbmMvj5P6I8 xjZ6EPqu5A4lNhHZqaiHn2+5wQLwq571nm6HXbHS1vZGXCS1G1RtcdG8fIRrpeR9pDkEPCHAs oOh682B7Cal4fJRc+4kScUm4Q3oKfhJkxDrHe9RXnqkfZVLh47EahYyhHrJGHhHFzw4AtQFLv vogGnlmb8YdhG3ydpBcmNJaRmM35keyRN/xGTKVA0v6ORSlRBac6TWXz/YP4JayluqcAuvzl9 1Vs4OLaGtuEjGZKNrtWp+4l6yU/NoM2qur1kWOnJ+KwQdGfFNtmgaGGusP93Zdnx4W1BAmSTB v8SFSalkGpiR8onZmeHzgrTdF+ss7pIAqiq4pHgZmI+/Jaes2tAvwmueY6q3bfAkcTPhz2riT 2YLXb5FV6j4rQXa/fYiWNSsYxhJikFXozy6fW6j4Gq8RbWMj/989qqw5xp658yRcm3+4bE7mb YRGPtDEyfVA+FevXga6tZA0Ki0fUiozgY5Wr+5SeWduDi23ktPLJTBdB1V+JUOt78ICLfzKLQ 5IaoGn7vBLaqA16jnXyUZI8oJ9jOCETSC8F1ssmT1jbwC4K8R5m+9ciudQ5xaCsr4qLb+Pp0s 2I+5PVH3hvpj1B6w X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jul 2018 20:31:54 -0000 On Sun, 01 Jul 2018 14:13:30 -0500, Paul Schmehl wrote: > I have a problem with a directory full of files that I can't seem to delete. > [...] > If I try to delete that specific filename, it seems to work. (Running rm > twice returns no such file the second time.) Yet the file count remains the > same. Is this on UFS or ZFS? If UFS, unmount the partition and perform a "fsck -f" for that partition. In worst case, do it twice. What you're observing looks a bit like filesystem inconsistency problems. Putting the filesystem back into a consistent state should solve the problem. > Nothing I've tried to delete these files seems to work. What can I do to > get rid of these files? There is a way to do it with "lower level tools", but I would not suggest this for now. But let me mention it anyway: You can unmount the partition, and then use "fsdb" to examine the file system to check for the inodes that point to the files, or the one pointing to the directory that contains the files. Then remove them interactively from within the "fsdb" program, or use "clri" to do it. Afterwards, run "fsck -f" at least once (check for error messages!) to return the file system into a consistent state - the formerly occupied space will then be contributed to the free blocks list, and the space is then available again. See "man fsdb" and "man clri" for details. And be very careful if you decide to do it this way. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...