Skip to content

Latest commit

 

History

History
6 lines (5 loc) · 360 Bytes

one-liner-scripts.org

File metadata and controls

6 lines (5 loc) · 360 Bytes

One-liner Scripts

Perl

Recursively adjust file permissions

# Pass files and directories you want fixed as parameters. Adjust this regex to set the script extensions [.](bat|(z|ba?|k|t)?sh) 
perl -MFile::Find -e 'find(sub {if(-d $_ || $_=~m/[.](bat|(z|ba?|k|t)?sh)/){chmod 0755, $_}else{chmod 0644, $_}},@ARGV)' ./a0 ./b0 ./script.sh ./file1