bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: chmod (coreutils) 4.5.1: failed to get attributes (buggy recursion)


From: Bob Proulx
Subject: Re: chmod (coreutils) 4.5.1: failed to get attributes (buggy recursion)
Date: Thu Oct 31 07:06:03 2002
User-agent: Mutt/1.4i

Benjamin Rampe <address@hidden> [2002-10-17 23:12:56 +0200]:
> Hello,
> chmod does not enter subdirectories for recursive changing file 
> permissions if there are no files of the given type in the 
> top-level directiry.
> 
> i.e:
> 
> corvus:/ogg-files# chmod -x *.ogg -R
> chmod: failed to get attributes of `*.ogg': No such file or directory

You are confused about what your shell is doing for you (expanding
wildcards) and what the command is doing for you.  The information you
need is in this reference.

  http://www.gnu.org/software/fileutils/doc/faq/

Look for "Why doesn't rm -r *.pattern recurse like it should?".
Different question, but the same problem and same answer.

> corvus:/ogg-files# cp ./new/radio tux/sendung001.ogg .
> corvus:/ogg-files# chmod -x *.ogg -R
> corvus:/ogg-files# 
> 
> And suddenly all the ogg-files in the subdirectories got their execution
> right removed.
> That is a very ugly behaviour.
> 
> Sorry, no patch from me. I do not have much experience with code of
> the coreutils. 

Use 'echo' to show you what the command is really doing.  Then use 'ls'
to show you if those files exist.

  echo chmod -x *.ogg -R
  ls -ld *.ogg

And don't forget to read the link above because the long explanation
is there not here.

Bob




reply via email to

[Prev in Thread] Current Thread [Next in Thread]