From: Valeri Galtsev
Sent: Wednesday, February 03, 2016 12:58 PM
On Wed, February 3, 2016 11:37 am, Tim Dunphy wrote:
> Hi all,
>
> I'm attempting to delete some directories and I want to be able to exclude
> a directory called 'logs' from being deleted.
On Wed, February 3, 2016 11:37 am, Tim Dunphy wrote:
> Hi all,
>
> I'm attempting to delete some directories and I want to be able to exclude
> a directory called 'logs' from being deleted.
>
> This is my basic find operation (without the exclusion)
>
> # find . -type d |tail -10
>
Tim Dunphy wrote:
> Hi all,
>
> I'm attempting to delete some directories and I want to be able to exclude
> a directory called 'logs' from being deleted.
>
> This is my basic find operation (without the exclusion)
>
> # find . -type d |tail -10
> ./d20160124-1120-df8mfb/deployments
>
Hi all,
I'm attempting to delete some directories and I want to be able to exclude
a directory called 'logs' from being deleted.
This is my basic find operation (without the exclusion)
# find . -type d |tail -10
./d20160124-1120-df8mfb/deployments
./d20160124-1120-df8mfb/releases
On 02/03/2016 10:51 AM, m.r...@5-cent.us wrote:
Right, but a) I think I tried using prune 20 years ago... and b) I thought
the o/p wanted to not deal with any directory whose name was logs. leaving
off prune would get everything, which is perhaps a bit more useful.
I think you don't
On 2/3/2016 12:37 PM, Tim Dunphy wrote:
> I'm attempting to delete some directories and I want to be able to exclude
> a directory called 'logs' from being deleted.
Since you can't have a file and a directory named "logs" in the same directory
at the same time (that I know of), you could turn on
On 02/03/2016 09:37 AM, Tim Dunphy wrote:
If I try to exlclude the logs directory with the prune command I get back
no results.
root@ops-manager:/tmp/tmp# find . -type d -prune -o -name 'logs' -print
What am I doing wrong?
You're not applying the prune command to items named logs, for one.
On 02/03/2016 10:11 AM, m.r...@5-cent.us wrote:
find . -type d ! -name logs -prune
That will prune all of the directories whose name is not "logs",
starting with "."
So... not terribly useful.
___
CentOS mailing list
CentOS@centos.org
Gordon Messmer wrote:
> On 02/03/2016 10:11 AM, m.r...@5-cent.us wrote:
>> find . -type d ! -name logs -prune
>
> That will prune all of the directories whose name is not "logs",
> starting with "."
>
> So... not terribly useful.
Right, but a) I think I tried using prune 20 years ago... and b) I
9 matches
Mail list logo