Re: getting rid of filenames with whitespaces

From: John Winters (newstmp_at_sinodun.org.uk)
Date: 01/31/04


Date: Sat, 31 Jan 2004 13:26:12 +0000 (GMT)

In article <4019fe80$0$264$f4da8220@news.eplus-online.de>,
KR <huh@what.edu> wrote:
>Hi fellow admins,
>
>i'm using a Linux system running Samba as a filestore for a Windows client.
>Now i have a large amount of files and directories containing
>whitespaces within the filenames. From the Windows side this is no
>problem, but since some Unix commands cannot handle such files properly,
>i would like to substitute each blank in a filename with an underscore
>("_").

I would really advise against this. Linux/UNIX commands are just as
happy with spaces as Windows ones are. Indeed, in many cases they're
*more* happy because spaces have always been allowed in Linux/UNIX file
names whilst they're an add-on afterthought for DOS/Windows.

Your users will get really hacked off with you if you go renaming their
files, and you'll be spreading disinformation if you use the excuse
"I had to do it because Linux can't cope with them".

Leave the file names alone and learn to use the utilities properly.

John

-- 
Wallingford, Oxfordshire, England
We had a woodhenge here once but it rotted.


Relevant Pages

  • Re: Cygwin like Module in perl
    ... I want to execute some of the unix commands on windows, ... using Cygwin to run unix commands on Windows. ...
    (perl.beginners)
  • Re: grep, which, and tail commands?
    ... there are equivalents for UNIX commands grep, which, and tail. ... tail with the -f flag is very valuable for viewing log files and ... UNIX Commands on Windows ...
    (microsoft.public.windows.server.scripting)
  • Re: Cygwin like Module in perl
    ... I want to execute some of the unix commands on windows, ... Now I need to convert all the shell scripts into perl scritp. ...
    (perl.beginners)
  • Re: rmdir and chmod help for Windows XP Home!
    ... chmod and rmdir are UNIX commands which have no effect in a Windows ... > in a test script and everything went OK... ...
    (comp.lang.php)