On 20-02-12 12:39, lynn wrote:
Hi openSUSE 12.1 umask 0022
In a shared folder, we want any file created to be group rw. Using acls is not an option.
#!/bin/sh share=/home/CACTUS/dropbox/ cd $share wihile true do if [ -N $share ]; then for a in * do if [ -N $a ]; then echo $(chmod g+w $a) echo "$a was changed" fi done fi sleep 4 done
But it's changing _all_ the files in the folder irrespectively: hh3:/home/CACTUS/dropbox # touch lynn lynn was changed
hh3:/home/CACTUS/dropbox # touch lynn2 lynn was changed lynn2 was changed
hh3:/home/CACTUS/dropbox # touch lynn3 lynn was changed lynn2 was changed lynn3 was changed
I thought it may be changing the timestamp: hh3:/home/CACTUS/dropbox # touch lynn4 -rw-rw---- 1 root 3000016 0 Feb 20 12:26 lynn -rw-rw---- 1 root 3000016 0 Feb 20 12:26 lynn2 -rw-rw---- 1 root 3000016 0 Feb 20 12:26 lynn3 -rw-rw---- 1 root 3000016 0 Feb 20 12:30 lynn4 but no.
Each time only one file has been modified. Why does it change _all_ of the files? Thanks, L x
The script says for a in * (all files in the directory) instead of for a in $* (all files in the argument list) Furthermore I'm not sure if it's wise to call this script "touch" instead of "mytouch" Regards, -- Jos van Kan registered Linux user #152704 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org