gs_kanata
asked on
Why TCL exec chmod does not work?
From the command line, I could run the following commad without question:
chmod 755 <dir>/*
However, if I did the same thing via TCL/Expect
exec chmod 755 <dir>/*
I got the error as:
ERROR: chmod: WARNING: can't access <dir>/*
permission is not an issue. Feel like TCL does not recognize <dir> correctly.
chmod 755 <dir>/*
However, if I did the same thing via TCL/Expect
exec chmod 755 <dir>/*
I got the error as:
ERROR: chmod: WARNING: can't access <dir>/*
permission is not an issue. Feel like TCL does not recognize <dir> correctly.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
file attributes does not work multiple files under certain directory in TCL language.
file attributes foodir/* -permissions 0755
will get
could not set permissions for file "foodir/*": no such file or directory
file attributes foodir/* -permissions 0755
will get
could not set permissions for file "foodir/*": no such file or directory
is this a specific directory? or all?
changing attribs is the same as using file.. man "file" and have a look at the -permissions argument :)