[X-Unix] Script - works, but not where I need it to
David Ledger
dledger at ivdcs.demon.co.uk
Thu Jul 1 00:24:30 PDT 2004
>From: Victor Eijkhout <eijkhout at cs.utk.edu>
>Subject: Re: [X-Unix] Script - works, but not where I need it to
>
>At 20:08 -0500 2004/06/30, Bert Knabe wrote:
>>find /Volumes/composing/\ \ \ Running\ Ads/* -mtime 1 -exec cp -p {}
>>/Volumes/Online/\PDF\'S/In/ \;
>
>What is that star doing there? The first argument of find is supposed
>to be a single directory. The rest are commands starting with a
>"-something" label.
Find will take multiple directory paths and 'find' below them in turn
([pathname ...] in the manpage). Here the '*' is probably just
matching too much, as William said later, and is redundant anyway.
and
>From: Bert Knabe <bert.knabe at lubbockonline.com>
>Subject: Re: [X-Unix] Script - works, but not where I need it to
>Date: Thu, 1 Jul 2004 00:39:35 -0500
>
>
>On Jul 1, 2004, at 12:23 AM, William H. Magill wrote:
>> By the way -- if you plan on doing lots of stuff like this from the
>> command line, loose the apostrophe and make it simply "PDFs" or
>> "PDF-s" ... ditto for spaces in file names -- use a dash or
>> underscore. It makes command line life much easier.
>
>The only reason I didn't change them was the amount of other stuff that
>would have to be changed to accommodate that change. But if I wind up
>doing more of this, I'll make sure I have more input into file and
>folder names. :)
I get round this with Apple's foldernames by putting a link without
spaces next to the offending directory name. As in:
cd /Library
ln -s 'Application Support' ApplicationSupport
ls -al
. . .
drwxrwxr-x 2 root admin 68 27 Sep 2003 Address
Book Plug-Ins
drwxrwxr-x 28 root admin 952 12 Jun 09:38 Application Support
lrwxrwxr-x 1 root admin 19 1 Jul 08:19
ApplicationSupport -> Application Support
drwxrwxr-x 8 root admin 272 1 Apr 00:38 Audio
. . .
If set to follow links, 'find' will follow both though.
David
--
David Ledger - Freelance Unix Sysadmin in the UK.
Chair of HPUX SysAdmin SIG of hpUG technical user group (www.hpug.org.uk)
dledger at ivdcs.co.uk (also dledger at ivdcs.demon.co.uk)
www.ivdcs.co.uk
More information about the X-Unix
mailing list