I’ve written before about using the editing features in dired (AKA wdired) to do neat things like redirect symlinks. I recently discovered that by adding the following option to your emacs config file:
;; allow editing file permissions (setq wdired-allow-to-change-permissions t)
then you can also edit the file permissions directly in the dired buffer.
Here’s a quick animated example where I want to set group write permissions for all the pdf files in a particular directory. I use several tools to make this really easy:
- I used dired-narrow to filter the view down to just the pdf files
- I use
C-x C-q
to make the dired buffer editable - I move to the group write permission spot on the first line and then use multiple cursors to add a cursor for each line
- I hit
w
to set the write permission,RET
to quit multiple cursors, andC-c C-c
to make the change permanent