Date: Sat, 15 Feb 2020 22:40:40 +0900 (JST) From: Yasuhiro KIMURA <yasu@utahime.org> To: freebsd-questions@freebsd.org Subject: Re: Removal script Message-ID: <20200215.224040.865767451214861597.yasu@utahime.org> In-Reply-To: <24af365c-bfab-b5ac-72e3-675b0450b75f@cloudzeeland.nl> References: <24af365c-bfab-b5ac-72e3-675b0450b75f@cloudzeeland.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
From: Jos Chrispijn <bsduser@cloudzeeland.nl> Subject: Removal script Date: Sat, 15 Feb 2020 14:31:59 +0100 > 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! Does 'nonsence' have subdirecties and should they also be removed? If answer is yes, try find /mysources -type -d -name nonsense -exec rm -rf {} + --- Yasuhiro KIMURA
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200215.224040.865767451214861597.yasu>