At 13:18 -0600 4/16/11, Doug McNutt wrote: >At 10:15 -0700 4/16/11, JRC wrote: >>Can I use BBEdit to a file's permission and/or ownership after I am >>done editing it ? >> >>I have used BBEdit to make a small revision to a file and then saved >>it. Now I am trying to change its permissions and ownership. I am >>curious to learn if I can use BBEdit for this task instead of >>Terminal. > > >You can surely do it with a BBEdit worksheet. The command would be: > >SetFile -t TYPE -c creator PathToFile > >Type and creator must be exactly 4 8-bit characters and quoting may be >required to get that from your shell. You'll also need the tool which comes >with Apple's Developer Tools. It's OK to have just the SetFile tool if it's in >your $PATH somewhere. There is also GetFileInfo for the reverse. > >And the tool names are case sensitive even on case insensitive disks. It's >because of the way the shell works. >
And I realize now that I may have misread your intentions. Permissions are changes with the chmod tool. chown changes the owner - user - of the file. chgrp changes the group. You may need to be a superuser to do chown and or chgrp. That's done with a line like sudo chown newowner FilePath But. . . BBEdit worksheets don't handle sudo very well because you have to enter a password. I have been known to place my password in my home directory as the contents of a file with a closing return. Then in a worksheet you can redirect input: sudo chown newowner FilePath < $HOME/mypassword That's a violation of everything secure. Don't do it with a machine on the net with anything important on it. -- --> From the U S of A, the only socialist country that refuses to admit it. <-- -- You received this message because you are subscribed to the "BBEdit Talk" discussion group on Google Groups. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at <http://groups.google.com/group/bbedit?hl=en> If you have a feature request or would like to report a problem, please email "[email protected]" rather than posting to the group. Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
