Unix Shell - Re: How do I find file "findme" in tree "bigtree" searching only s

This is Interesting: Free IT Magazines  
Home > Archive > Unix Shell > August 2007 > Re: How do I find file "findme" in tree "bigtree" searching only s





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: How do I find file "findme" in tree "bigtree" searching only s
Rikishi 42

2007-08-22, 7:23 pm

On 2007-08-21, Chris Allen <ca.allen@gmail.com> wrote:

> How do I find file "findme" in tree "bigtree" searching only
> subdirectories named "in_here"?
> I've been pulling my hair out for an hour or so trying to figure out
> how to do this with the find command.


So, you're looking in bigtree, for subdirs called 'in_here', right?
And then you want to delete the file 'findme' if it exists in that subdir?

How about :

find bigtree/ -type d -name "in_here" -exec rm -v '{}'/findme ';'


--
There is an art, it says, or rather, a knack to flying.
The knack lies in learning how to throw yourself at the ground and miss.
Douglas Adams
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2009 webservertalk.com