Discussion:
[p4] Changing multiple files permissions
Michael Mirman
2016-10-25 10:53:51 UTC
Permalink
I have multiple directories that have +w (Always writable in workspace). How do
I change all files to keep all permissions as is, and remove the +w if exists.
Need the p4 command (I know p4 edit -t is per file type...). Some files are
text, some are binaries...
This worked for me:

-> p4 files ... | grep +w | awk '{print $NF, $1}' | sed -e 's/(/p4 edit -t /' -e 's/+w)//' -e 's/#.*//' | sh -x


:-)
--
Michael Mirman
MathWorks, Inc.
508-647-7555
--
Please click here to see the post in its original format:
http://forums.perforce.com/index.php?/topic/5012-changing-multiple-files-permissions
_______________________________________________
perforce-user mailing list - perforce-***@perforce.com
http://maillist.perforce.com/mailman/listinfo/perforce-user
_______________________________________________
perforce-user mailing list - perforce-***@perforce.com
http://m
Michael Mirman
2016-10-25 18:59:30 UTC
Permalink
Good point about the spaces! I keep forgetting about those weird paths...

I didn’t know you can pass the verb itself to "p4 -x -". I thought I had to say "p4 -x - edit".
Thanks!
--
Michael Mirman
MathWorks, Inc.
3 Apple Hill Drive, Natick, MA 01760
508-647-7555
-----Original Message-----
Behalf Of Sambwise
Sent: Tuesday, October 25, 2016 11:25 AM
Subject: Re: [p4] Changing multiple files permissions
Posted on behalf of forum user 'Sambwise'.
I don't think that "awk $NF" is going to cope too well with
files with spaces in their names.�� :)
http://stackoverflow.com/questions/39954721/change-perforce-files-
recursive-permissions
- run
--
http://forums.perforce.com/index.php?/topic/5012-changing-multiple-
files-permissions
_______________________________________________
perforce-user mailing list - perforce-***@perforce.com
http://maill
Loading...