vpalos.com // milk, cookies, segfaults…

Recursive chmod distinguishing files from folders

by Valeriu Paloş on December 16, 2009

Version 3 An even better method is: find “$target” -type f -exec chmod -c “$mode_files” {} \; \ -or -type d -exec chmod -c “$mode_dir” {} \; A true one-liner! 😀 Version 2 A better method is this: find “$target” -type f -exec chmod -c “$mode_files” {} \; find “$target” -type d -exec chmod -c […]