shtools/zumask/zumask
Mateo FERON 0950379829 Init
2020-04-06 16:01:00 +02:00

15 lines
308 B
Bash
Executable file

#!/bin/sh
shift $((OPTIND-1))
if [ $# -gt 0 ]
then
_path=$*
else
_path=$(pwd)
fi
#find "$_path" -type d -exec chmod $(umask -S) {} \;
#find "$_path" -type f -exec chmod $(umask -S | tr -d 'x') {} \;
chmod "$(umask -S)" $(find "$_path" -type d)
chmod "$(umask -S | tr -d 'x')" $(find "$_path" -type f)