From owner-freebsd-questions@freebsd.org Sat Feb 15 13:32:07 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6135623AF0E for ; Sat, 15 Feb 2020 13:32:07 +0000 (UTC) (envelope-from bsduser@cloudzeeland.nl) Received: from poseidon.cloudzeeland.nl (cloudzeeland.xs4all.nl [83.161.133.58]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "cloudzeeland.nl", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48KWPf281Xz4Fjl for ; Sat, 15 Feb 2020 13:32:05 +0000 (UTC) (envelope-from bsduser@cloudzeeland.nl) Received: from poseidon.cloudzeeland.nl (cloudzeeland.nl [10.10.10.36]) by poseidon.cloudzeeland.nl (Postfix) with ESMTP id 00E4C10BC8F4 for ; Sat, 15 Feb 2020 14:31:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cloudzeeland.nl; s=cloud; t=1581773518; bh=YGAJXk1GjgAmBVpDwi7/FQEHAPNkcZHx8ApPq33ps5M=; h=To:From:Subject:Date; b=BX5gSey2dfWLcs0dCsiWdv0nZfVGmKZ/5HCsLuqRElrFHtPAO38JJ2itEcwjLSQ5w zEHEHZ6P3sqY5++hbRaXW5uwl3zuKSRSlQL/tGE+V4hHGWhiqvSKlUlF+YRmMcl0nr EBkcdWaQZAaulH8LQHiXWIwLaHlqt2i1NLNUDmvI= Received: from [10.10.10.34] (pion1.rpicloud.nl [82.176.127.71]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by poseidon.cloudzeeland.nl (Postfix) with ESMTPSA id 8BC3A10BC8F3 for ; Sat, 15 Feb 2020 14:31:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cloudzeeland.nl; s=cloud; t=1581773517; bh=YGAJXk1GjgAmBVpDwi7/FQEHAPNkcZHx8ApPq33ps5M=; h=To:From:Subject:Date; b=zGnEn5tl+KgNs7R/RCawq9ACA2+mJyNZjHolWxAPykeW+Hb2LUsGMFn4iGHtmc3Gs FNa5+OpgXsBVRi8IOW7Qr3iMbdzNkGcYlXM0S1xHpqWuRHqvJQneW2sd0rtAYNPbax XZaFYu1JmVobhxUNbTUBgmdoMmUC9h0Ne1G4FXjQ= To: freebsd-questions@freebsd.org From: Jos Chrispijn Subject: Removal script Organization: Userland rocks! Message-ID: <24af365c-bfab-b5ac-72e3-675b0450b75f@cloudzeeland.nl> Date: Sat, 15 Feb 2020 14:31:59 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB X-Virus-Scanned: ClamAV using ClamSMTP on poseidon.cloudzeeland.nl X-Rspamd-Queue-Id: 48KWPf281Xz4Fjl X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=cloudzeeland.nl header.s=cloud header.b=BX5gSey2; dkim=pass header.d=cloudzeeland.nl header.s=cloud header.b=zGnEn5tl; dmarc=none; spf=pass (mx1.freebsd.org: domain of bsduser@cloudzeeland.nl designates 83.161.133.58 as permitted sender) smtp.mailfrom=bsduser@cloudzeeland.nl X-Spamd-Result: default: False [-2.77 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[cloudzeeland.nl:s=cloud]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+a]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; HAS_ORG_HEADER(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; DMARC_NA(0.00)[cloudzeeland.nl]; DKIM_TRACE(0.00)[cloudzeeland.nl:+]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; IP_SCORE(-0.27)[ipnet: 83.160.0.0/14(-1.36), asn: 3265(-0.03), country: NL(0.03)]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:3265, ipnet:83.160.0.0/14, country:NL]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Feb 2020 13:32:07 -0000 I am looking for a way to remove a nested subdirectory in a directory. Example: directory /mysources has a certain number of subdirectories which contain subdirectory 'nonsense' in various subdirectories, which contain also subdirectory 'nonsense', etc. What I would like to do is that the script removes all 'nonsense' folders in the base /mysources. Can you pls tell me how I can do that savest? Thanks! /jos