Sometimes I have to deal with people who use a tentatively OS that, among other things, doesn’t understand UNIX-like permissions :).
I modified a bash script of Kaz Kylheku (found in bash-doc) which for a given folder recursively changes:
- the permissions of all its files to 644 (and “dos2unix” them);
- the permissions of all its subdirectories to 755
You can find it here.
UPDATE (2007-01-11): it doesn’t make sense to run dos2unix against a non text file so I have just uploaded here a “-t” version that processes with dos2unix only some kind of file as in:
if [[ "$file" =~ '[css|html|js|php]$’ ]]; then
dos2unix $file
fi
Last update: 2008-04-12

One Trackback
[...] it to compute a different chechsum is pretty trivial of course). It is a modified version of the already hacked script written by Kaz [...]