-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Bryan Kadzban wrote:
> Bruce Dubbs wrote:
>> Bruce Dubbs wrote:
>>> Chris Staub wrote:
>>>> On 11/19/2009 08:30 PM, Bruce Dubbs wrote:
>>>>> Chris Staub wrote:
>>>>>> But there are the ".install" files in every subdir, not just in the
>>>>>> "linux" dir. I use:
>>>>>>
>>>>>> find dest/include -name .install -or -name ..install.cmd | xargs rm -fv
>>>>> Ahh. I didn't realize they were in multiple directories.
>>>>>
>>>>> find dest/include -name .install -or -name ..install.cmd -exec rm -v
>>>>> '{}' \;
>>>> Not quite - the -exec only works on the last option before it...or
>>>> something, I'm not quite sure exactly how to describe it technically,
>>>> but in this case it would only operate on the files for the last -name
>>>> option, or just the "..install.cmd" files. If you use -exec you'd need
>>>> to put it after *each* -name, like this...
>>>>
>>>> find dest/include -name .install -exec rm -v '{}' \; -or -name
>>>> ..install.cmd -exec rm -v '{}' \;
>>>>
>>>> So in this case I found it easier just to pipe it through xargs.
>>> Really? I did:
>>>
>>> /mnt/lfs/sources/linux-2.6.30.2$ find dest/include -name .install -or
>>> -name ..install.cmd -exec ls -l {} \;
>> Drat. Never mind. I see you are right. However
>>
>> find dest/include -name .*install* -exec ls -l {} \;
>>
>> does the right thing. The asterisks and braces do not need to be quoted
>> in bash, but the safe way would be to write:
>>
>> find dest/include -name '.*install*' -exec ls -l '{}' \;
>
> The asterisks need to be quoted if the pattern could possibly expand to
> any files (in the current directory, since no / characters are present)
> -- this is unlikely, but possible, so quoting them is still a good idea
> I think.
>
> The braces, I'm not sure on. Probably safest to either use '{}' or \{},
> I think.
>
>
You could also do:
find dest/include -name '.*install*' -delete
- --
ABCD
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.13 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAksMxlsACgkQOypDUo0oQOoL7QCeP5OnpcNyHcELjOYDVivmxRyu
H+8AoLM5ciW92A6HK3ketT/DTpYzj5RW
=kpWb
-----END PGP SIGNATURE-----
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page