From: Harry on
Hi All

On two different Linux boxes, the find have different behavious.
What gives? What alternative I can use on machineA whose find
does not understand -perm /u+w ?

$ uname -a
Linux machineA 2.6.5-7.282-bigsmp #1 SMP Tue Aug 29 10:40:40 UTC 2006
i686 i686 i386 GNU/Linux
$ /usr/bin/find --version
GNU find version 4.1.7
$ /usr/bin/find $HOME ! \( -perm /u+w \)
/usr/bin/find: invalid mode `/u+w'
$

==

$ uname -a
Linux machineB 2.6.16.60-0.27-bigsmp #1 SMP Mon Jul 28 13:06:32 UTC
2008 i686 i686 i386 GNU/Linux
$ /usr/bin/find --version
GNU find version 4.2.27
Features enabled: D_TYPE O_NOFOLLOW(enabled) LEAF_OPTIMISATION
$ /usr/bin/find $HOME ! \( -perm /u+w \)
$

TIA
From: Barry Margolin on
In article
<a11289b2-bedb-43e4-98cf-255a11efbc13(a)b21g2000vbh.googlegroups.com>,
Harry <harryooopotter(a)hotmail.com> wrote:

> Hi All
>
> On two different Linux boxes, the find have different behavious.
> What gives? What alternative I can use on machineA whose find
> does not understand -perm /u+w ?
>
> $ uname -a
> Linux machineA 2.6.5-7.282-bigsmp #1 SMP Tue Aug 29 10:40:40 UTC 2006
> i686 i686 i386 GNU/Linux
> $ /usr/bin/find --version
> GNU find version 4.1.7
> $ /usr/bin/find $HOME ! \( -perm /u+w \)
> /usr/bin/find: invalid mode `/u+w'
> $
>
> ==
>
> $ uname -a
> Linux machineB 2.6.16.60-0.27-bigsmp #1 SMP Mon Jul 28 13:06:32 UTC
> 2008 i686 i686 i386 GNU/Linux
> $ /usr/bin/find --version
> GNU find version 4.2.27
> Features enabled: D_TYPE O_NOFOLLOW(enabled) LEAF_OPTIMISATION
> $ /usr/bin/find $HOME ! \( -perm /u+w \)
> $
>
> TIA

Use the obsolete -perm +mode syntax that -perm /mode replaced, and use
the octal mode to prevent problems.

find $HOME ! \( -perm +200 \)

--
Barry Margolin, barmar(a)alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
From: Bill Marcum on
On 2010-05-05, Harry <harryooopotter(a)hotmail.com> wrote:
> Hi All
>
> On two different Linux boxes, the find have different behavious.
> What gives? What alternative I can use on machineA whose find
> does not understand -perm /u+w ?
>
> $ uname -a
> Linux machineA 2.6.5-7.282-bigsmp #1 SMP Tue Aug 29 10:40:40 UTC 2006
> i686 i686 i386 GNU/Linux
> $ /usr/bin/find --version
> GNU find version 4.1.7
> $ /usr/bin/find $HOME ! \( -perm /u+w \)
> /usr/bin/find: invalid mode `/u+w'
> $
>
find $HOME ! -perm +200