From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23980 invoked from network); 7 Apr 2003 08:31:09 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 7 Apr 2003 08:31:09 -0000 Received: (qmail 9208 invoked by alias); 7 Apr 2003 08:30:28 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6027 Received: (qmail 9201 invoked from network); 7 Apr 2003 08:30:27 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 7 Apr 2003 08:30:27 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [212.227.126.201] by sunsite.dk (MessageWall 1.0.8) with SMTP; 7 Apr 2003 8:30:26 -0000 Received: from [172.17.0.252] (helo=erdbeere.schlund.de) by mxintern.kundenserver.de with esmtp (Exim 3.35 #1) id 192S1J-0005Mg-00 for zsh-users@sunsite.dk; Mon, 07 Apr 2003 10:30:25 +0200 Received: from luthien by erdbeere.schlund.de with local id 192S3B-0001Ee-00 for ; Mon, 07 Apr 2003 10:32:21 +0200 Date: Mon, 7 Apr 2003 10:32:21 +0200 From: Dominik Vogt To: Zsh Users Subject: null bytes in file names? Message-ID: <20030407083221.GD557@gmx.de> Reply-To: dominik.vogt@gmx.de Mail-Followup-To: Zsh Users Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i As far as I know, UNIX file systems allow null bytes in file names. Out of curiosity I tried generating such a file. I edited a file fn in a hex editor and put a single null byte into it. Take I (with "touch"): $ touch $(< fn) touch: creating `': No such file or directory touch: creating `': No such file or directory $ touch $(< fn) touch: creating `': No such file or directory $ touch s$(< fn)t $ touch u"$(< fn)"v $ ls fn s t u "u" might actually be named "u^@v" but displayed incorrectly by ls, so let's try to access a file named "u". $ ls u u Nope, the name got cut off. $ rm s t y Take II (shell builtins only): $ echo foo > $(< fn) zsh: no such file or directory: $ echo foo > "$(< fn)" zsh: no such file or directory: ^@ $ echo foo > w$(< fn)x $ echo foo > y$(< fn)z $ ls fn w x y z $ ls w y w y So, no luck. I wonder where the problem comes from: - zsh? (4.0.4) - libc? - kernel? (linux-2.4.20) Bye Dominik ^_^ ^_^