Monday, January 18, 2010

[nslu2-linux] Umlauts and find -exec (Curly Braces)

 

Hi folks,

I have some simple scripts to adjust rights of files, after some one
copied files to the file store (script at end of the mail).
This script sometimes finds filenames with German Umlauts and then can
not execute the -exec term.
In such cases, I only get:
find: ./Aerzte, Die/Die Ärzte - Friedenspanzer.mp3: No such file
or directory
find: ./Aerzte, Die/Die Ärzte - Lest Die Pravda.mp3: No such file
or directory

How can I forcce the {} to use these files?
The best would be to convert all the non-latin stuff to easy writing, so
'Ä' should become 'Ae'.
But even this cant be done by find -f -exec, or?

I could also imagine to temporarily convert my filesystems i18n
settings, renaming the files, then set it back to ... (whatever,
wherever its configured)

Any hint for me?

___________________[script]_____________________
#!/bin/bash
echo "Starting..."
find . -type d -exec chmod u=rsx,g=rwsx,o=rx {} \;
find . -type d -exec chown audioplayers:audioplayer {} \;
find . -type f -exec chmod u=rx,g=rwx,o=rx {} \;
find . -type f -exec chown audioplayers:audioplayer {} \;
echo "Done..."
___________________[end]_____________________

best regards,
M.K. Reis

__._,_.___
.

__,_._,___

No comments:

Post a Comment