Batch change permissions for folders and files
Stand: 1. August 2023, Details können veraltet sein.
If you ever need to change permissions for a bunch of folder and/or files without a GUI, you can utilize find and xargs to achieve that in the shell in a flash:
find -xtype d | xargs chmod 755 # directories, standard permissions
find -xtype f | xargs chmod 644 # files, standard permissions
find -xtype d | xargs chmod 775 # directories, writeable for group
find -xtype f | xargs chmod 664 # files, writeable for groupBasically what we are doing here is using find to find every directory or file, depending on the type. The option xtype, followed by d or f, helps us limit the (recursive) search to directories and files respectively. xtype includes symbolic links into the results, while type would not. the resulting directory/file names are then piped into xargs, which applies the command it is followed by (here: chmod 755 and chmod 644) to the list it receives from the pipe.