As --action now supports custom scripts with 2 parameters (as far as I could gather from the docs/code), does this imply that it can be used as an additional place for actions usually done by --exec?
For example, changing permissions, adding ACLs or converting links into absolute symlinks.
Is this appropriate or would exec still be better from a code perspective?
Custom action vs exec script
Custom action vs exec script
I only work in black and sometimes very, very dark grey. (Batman)
Re: Custom action vs exec script
-exec is better suited for fixing permissions after files have been processed. If you're using your own --action then you can do absolutely anything, and so the FileBot history is disabled for these operations.
Notably, you can use + just like with find to run a single command with many file arguments, potentially making things much faster:
Notably, you can use + just like with find to run a single command with many file arguments, potentially making things much faster:
Code: Select all
-exec chmod 755 {f} +
Re: Custom action vs exec script
Neat.
One of the main reasons was to use absolute symlinks, for some cases I find them very useful.
So if I may summarize the main differences between action and exec:
One of the main reasons was to use absolute symlinks, for some cases I find them very useful.
So if I may summarize the main differences between action and exec:
- any custom action disables history, so it would need to be replicated in the action script if needed
- actions do not have bindings available to exec (e.g. {n}, {t}, {f} and similar)
- exec scripts support chaining arguments instead of running the command once for each file
I only work in black and sometimes very, very dark grey. (Batman)