Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Feb 2020 22:40:40 +0900 (JST)
From:      Yasuhiro KIMURA <>
Subject:   Re: Removal script
Message-ID:  <>
In-Reply-To: <>
References:  <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
From: Jos Chrispijn <>
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: <>