# [EMAIL PROTECTED] / 2002-09-27 20:06:45 +0200:
> Roman Neuhauser <[EMAIL PROTECTED]> wrote:
> > # [EMAIL PROTECTED] / 2002-09-27 19:37:15 +0200:
> > > Slower? I don't think that -name "*.[Jj][Pp][Gg]" is any
> > > slower than -iname "*.jpg".
> >
> > i was talking about find(1) complet
Roman Neuhauser <[EMAIL PROTECTED]> wrote:
> # [EMAIL PROTECTED] / 2002-09-27 19:37:15 +0200:
> > Slower? I don't think that -name "*.[Jj][Pp][Gg]" is any
> > slower than -iname "*.jpg".
>
> i was talking about find(1) completely rewritten as a shell script.
OK, sorry then. I wasn't r
# [EMAIL PROTECTED] / 2002-09-27 19:37:15 +0200:
> Roman Neuhauser <[EMAIL PROTECTED]> wrote:
> > the point is that emulating find with other tools would be so long
> > winded that everyone would end up with find written as a shell
> > script. that would be a lot slower, and someone
Roman Neuhauser <[EMAIL PROTECTED]> wrote:
> the point is that emulating find with other tools would be so long
> winded that everyone would end up with find written as a shell
> script. that would be a lot slower, and someone would reimplement it
> in C. thus, saying that -ina
# [EMAIL PROTECTED] / 2002-09-27 18:23:27 +0200:
> Roman Neuhauser <[EMAIL PROTECTED]> wrote:
> > # [EMAIL PROTECTED] / 2002-09-27 18:10:04 +0200:
> > > Well, almost. Those primaries which operate on the properties of the
> > > inodes are required (-perm, -mtime etc.).
> >
> > not reall
Roman Neuhauser <[EMAIL PROTECTED]> wrote:
> # [EMAIL PROTECTED] / 2002-09-27 18:10:04 +0200:
> > Well, almost. Those primaries which operate on the properties of the
> > inodes are required (-perm, -mtime etc.).
>
> not really: ls(1).
ls(1) output is not suitable for parsing, unfortun
# [EMAIL PROTECTED] / 2002-09-27 18:10:04 +0200:
> Roman Neuhauser <[EMAIL PROTECTED]> wrote:
> > # [EMAIL PROTECTED] / 2002-09-27 17:15:00 +0200:
> > > That wouldn't make it any more portable. Bugging the Open Group
> > > _might_ be more useful.
> >
> > right.
> >
> > > But then ag
Roman Neuhauser <[EMAIL PROTECTED]> wrote:
> # [EMAIL PROTECTED] / 2002-09-27 17:15:00 +0200:
> > That wouldn't make it any more portable.
> > Bugging the Open Group _might_ be more useful.
>
> right.
>
> > But then again, it's against the UNIX philosophy.
> > In UNIX, you've got a
# [EMAIL PROTECTED] / 2002-09-27 17:15:00 +0200:
> Roman Neuhauser <[EMAIL PROTECTED]> wrote:
> > # [EMAIL PROTECTED] / 2002-09-27 14:36:48 +0200:
> > > The problem with that is that it's not portable. I try
> > > to avoid getting used to such non-portable features.
> > > Typing an extra grep
Roman Neuhauser <[EMAIL PROTECTED]> wrote:
> # [EMAIL PROTECTED] / 2002-09-27 14:36:48 +0200:
> > The problem with that is that it's not portable. I try
> > to avoid getting used to such non-portable features.
> > Typing an extra grep is faster than using -iname and
> > then finding out that
# [EMAIL PROTECTED] / 2002-09-27 14:36:48 +0200:
> Roman Neuhauser <[EMAIL PROTECTED]> wrote:
> > you can save the grep with
> > % find foo -type f -iname '*.jpg' | xargs ...
>
> The problem with that is that it's not portable. I try
> to avoid getting used to such non-portable fea
Roman Neuhauser <[EMAIL PROTECTED]> wrote:
> # [EMAIL PROTECTED] / 2002-09-22 21:53:58 -0400:
> > On Thu, 19 Sep 2002, Oliver Fromme wrote:
> > > This also enables you to use grep to filter the file names in
> > > a more sophisticated way than find itself can do:
> > > find foo -type f | grep
# [EMAIL PROTECTED] / 2002-09-23 22:19:26 -0400:
> On Mon, 23 Sep 2002, Roman Neuhauser wrote:
> > you can save the grep with
> > % find foo -type f -iname '*.jpg' | xargs ...
> > but i think someone already posted this
>
> I realized another question - in my five or so years of u
On 24 Sep 2002, Duncan Anker wrote:
> On Tue, 2002-09-24 at 12:24, Peter Leftwich wrote:
> > On Mon, 23 Sep 2002, Giorgos Keramidas wrote:
> > > On 2002-09-22 21:53, Peter Leftwich <[EMAIL PROTECTED]> wrote:
> > > > That leads me to wonder about using "rev" to reverse the order of
> > > > charact
On Tue, 2002-09-24 at 12:24, Peter Leftwich wrote:
> On Mon, 23 Sep 2002, Giorgos Keramidas wrote:
> > On 2002-09-22 21:53, Peter Leftwich <[EMAIL PROTECTED]> wrote:
> > > That leads me to wonder about using "rev" to reverse the order of
> > > characters on the line and "cut" using a field delimit
On Mon, 23 Sep 2002, Giorgos Keramidas wrote:
> On 2002-09-22 21:53, Peter Leftwich <[EMAIL PROTECTED]> wrote:
> > That leads me to wonder about using "rev" to reverse the order of
> > characters on the line and "cut" using a field delimiter of "." :) :)
> You probably could, and then use rev to
On Mon, 23 Sep 2002, Roman Neuhauser wrote:
> you can save the grep with
> % find foo -type f -iname '*.jpg' | xargs ...
> but i think someone already posted this
I realized another question - in my five or so years of using the find
command, I have never until now used the "-type
On 2002-09-22 21:53, Peter Leftwich <[EMAIL PROTECTED]> wrote:
> You know, it's sad but in all my nine (9) years of grepping, I never once
> used the "$" -- the "^" for "line beginning with" yes, but never the
> immensely useful "$" in order to obtain the .xxx extensions :)
>
> That leads me to w
# [EMAIL PROTECTED] / 2002-09-22 21:53:58 -0400:
> On Thu, 19 Sep 2002, Oliver Fromme wrote:
> > This also enables you to use grep to filter the file names in
> > a more sophisticated way than find itself can do:
> > find foo -type f | grep -i '\.jpg$' | xargs -J % mv % bar
>
> Amazing, I just wa
On Thu, 19 Sep 2002, Oliver Fromme wrote:
> Peter Leftwich <[EMAIL PROTECTED]> wrote:
> > Tonight I surprised myself by running `find ~/Desktop/folder/ -name "*.jpg"
> > -exec mv {} ~/Desktop/folderjpgs/ \;` successfully! My first custom find
> > command line ever.
> In general, it is a good i
Tim Peters <[EMAIL PROTECTED]> wrote:
> FYI, find and xargs can work with weird filenames (as long as they
> don't contain a \0) with these kind of options:
>
> find . -print0 | xargs -0 command
UNIX filenames cannot contain '\0' bytes, so you're safe.
(There are only two characters disallo
On Fri, Sep 20, 2002 at 09:05:10AM +1000, Duncan Anker wrote:
> >
> > find foo -type f | grep -i '\.jpg$' | xargs -J % mv % bar
> >
>
> My preferred method also. But ... I can never get that to work if there
> are spaces (or other illegal characters) in the file names.
>
> And no, I don't usua
On Thu, 2002-09-19 at 23:53, Oliver Fromme wrote:
>
> In general, it is a good idea to try to avoid -exec, because
> it is inefficient. -exec runs the specified command for every
> single file, whilch can be terribly slow if there are a lot of
> files. Better use xargs instead, which will colle
Peter Leftwich <[EMAIL PROTECTED]> wrote:
> Tonight I surprised myself by running `find ~/Desktop/folder/ -name "*.jpg"
> -exec mv {} ~/Desktop/folderjpgs/ \;` successfully! My first custom find
> command line ever.
>
> But there were two issues -- I had to escape the semicolon with a "\" -
Or, try "-iname" instead of "-name"
man find
...
-iname pattern
Like -name, but the match is case insensitive.
...
Hope that helps,
-Matt
On Thu, 2002-09-19 at 07:57, Brian T. Schellenberger wrote:
>
>
>
> On Thursday 19 September 2002 01:38 am, Peter Leftwich wrote:
> | Tonigh
On Thursday 19 September 2002 01:38 am, Peter Leftwich wrote:
| Tonight I surprised myself by running `find ~/Desktop/folder/ -name
| "*.jpg" -exec mv {} ~/Desktop/folderjpgs/ \;` successfully! My first
| custom find command line ever.
|
| But there were two issues -- I had to escape the semic
On 2002-09-19 01:38, Peter Leftwich <[EMAIL PROTECTED]> wrote:
> Tonight I surprised myself by running
> `find ~/Desktop/folder/ -name "*.jpg" -exec mv {} ~/Desktop/folderjpgs/ \;`
> But there were two issues -- I had to escape the semicolon with a "\" --
> does this ever cause problems for find
Thus spake Peter Leftwich ([EMAIL PROTECTED]):
> But there were two issues -- I had to escape the semicolon with a "\" --
> does this ever cause problems for find command lines? Second, this found
No, its a requirement to ensure the shell ignores the character.
> only *.jpg files and left beh
Tonight I surprised myself by running `find ~/Desktop/folder/ -name "*.jpg"
-exec mv {} ~/Desktop/folderjpgs/ \;` successfully! My first custom find
command line ever.
But there were two issues -- I had to escape the semicolon with a "\" --
does this ever cause problems for find command lines?
29 matches
Mail list logo