Prev: pine copy emails back to the server...
Next: korn shell negation operator not working as expected
From: The Derfer on 9 Feb 2010 14:35 How come this command doesn't simply ls the results of the find command in the directory executed?: boxman user1> find . -mtime -10 -exec ls {}\; find: missing argument to `-exec' In case it helps: Linux boxman 2.6.18-92.el5 #1 SMP Fri May 23 23:40:43 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux Thanks in advance.
From: pk on 9 Feb 2010 14:38 The Derfer wrote: > How come this command doesn't simply ls the results of the > find command in the directory executed?: > > boxman user1> find . -mtime -10 -exec ls {}\; > find: missing argument to `-exec' Try with a space: find . -mtime -10 -exec ls {} \; In this specific case though, you don't need the -exec: find . -mtime -10 also take a look at the -ls action of GNU find (man find).
From: WH on 9 Feb 2010 14:48 > boxman user1> find . -mtime -10 -exec ls {}\; > find: missing argument to `-exec' find . -mtime -10 -exec ls \{} \; or find . -mtime -10 -exec ls '{}' \; works
From: Rikishi42 on 9 Feb 2010 15:16 On 2010-02-09, WH <whzhao(a)gmail.com> wrote: > > >> boxman user1> find . -mtime -10 -exec ls {}\; >> find: missing argument to `-exec' > > find . -mtime -10 -exec ls \{} \; > > or > > find . -mtime -10 -exec ls '{}' \; > > works and find . -mtime -10 -exec ls '{}' ';' But, as allready stated, the -exec is redundant -- Any time things appear to be going better, you have overlooked something.
From: Sven Mascheck on 9 Feb 2010 16:44 pk wrote: > the -ls action of GNU find (man find). rather, of BSD derived find implementations. -- http://www.in-ulm.de/~mascheck/various/find/#list
|
Next
|
Last
Pages: 1 2 Prev: pine copy emails back to the server... Next: korn shell negation operator not working as expected |