Hi, I have just changed my linux samba server from 2.2 to 3.0 and now i need to change all the file name which contain a "sort of apostrophe". With samba 3.0, Windows does not accept this character anymore. It appears under linux with ? or ^Y I'm looking for a model of shell script which could automatically change this character by another in all users directories ! Can somebody give me a hit ? Thank you very much. Guy Roussin
Alexander E. Patrakov
2004-Sep-01 01:19 UTC
[Samba] Re: Automatically changing files names
Guy Roussin wrote:> Hi, > > I have just changed my linux samba server from 2.2 to 3.0 and now i need > to change all the file name which contain a "sort of apostrophe". > With samba 3.0, Windows does not accept this character anymore. > It appears under linux with ? or ^Y > > I'm looking for a model of shell script which could automatically change > this character by another in all users directories ! > > Can somebody give me a hit ? > Thank you very much.Some guesses: 1) Probably your locale is not set up correctly. 2) try "dos charset = cp437", "unix charset=ISO-8859-1" (the default for unix charset is UTF-8). 3) If you do want to use UTF-8 (not recommended if you also run anything other than SAMBA), you will have to rename files. You will be able to do that in a batch with the "convmv" program: http://j3e.de/linux/convmv/convmv-1.08.tar.gz You will still have to convert all UNIX txt files to UTF-8 with iconv and throw Midnight Commander out of the window, if you adopt the solution (3). -- Alexander E. Patrakov