From owner-freebsd-questions@FreeBSD.ORG Tue Feb 10 06:21:11 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C41811065670 for ; Tue, 10 Feb 2009 06:21:11 +0000 (UTC) (envelope-from k0802647@telus.net) Received: from defout.telus.net (defout.telus.net [199.185.220.240]) by mx1.freebsd.org (Postfix) with ESMTP id 6FF8F8FC13 for ; Tue, 10 Feb 2009 06:21:11 +0000 (UTC) (envelope-from k0802647@telus.net) Received: from priv-edtnaa04.telusplanet.net ([75.157.11.254]) by priv-edtnes28.telusplanet.net (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20090210051901.HGSC1538.priv-edtnes28.telusplanet.net@priv-edtnaa04.telusplanet.net> for ; Mon, 9 Feb 2009 22:19:01 -0700 Received: from oliver.bc.lan (d75-157-11-254.bchsia.telus.net [75.157.11.254]) by priv-edtnaa04.telusplanet.net (BorderWare Security Platform) with ESMTP id D9B9092138323927 for ; Mon, 9 Feb 2009 22:19:01 -0700 (MST) Received: from [10.111.111.112] (unknown [10.111.111.112]) by oliver.bc.lan (Postfix) with ESMTP id A170F62AA; Mon, 9 Feb 2009 21:19:00 -0800 (PST) Message-ID: <49910E44.9020904@telus.net> Date: Mon, 09 Feb 2009 21:19:00 -0800 From: Carl User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <49067148.6080307@telus.net> In-Reply-To: <49067148.6080307@telus.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: wildcards don't work in sh shell for FAT32 filesystem X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2009 06:21:12 -0000 Why do pathnames containing a wildcard work in the tcsh shell regardless of the target filesystem, but do not work in the sh shell if the target filesystem is FAT32? The following sequence begins in the tcsh shell by mounting a FAT32 partition from a USB thumb drive. /tmp is in a UFS2 partition. There are no files with "fish" in their names in either location. This is happening in FreeBSD 7.0-RELEASE. Why do the last four commands not have the same result? tcsh# mount_msdosfs /dev/da0s1 /mnt tcsh# rm -f /tmp/fish* rm: No match. tcsh# rm -f /tmp/*fish rm: No match. tcsh# rm -f /mnt/fish* rm: No match. tcsh# rm -f /mnt/*fish rm: No match. tcsh# sh sh# rm -f /tmp/fish* sh# rm -f /tmp/*fish sh# rm -f /mnt/fish* rm: /mnt/fish*: Invalid argument sh# rm -f /mnt/*fish rm: /mnt/*fish: Invalid argument FWIW, the context of this discovery was trying to use the grub-install script from the GRUB port to install its boot loader on a FAT32 thumb drive. The script aborts when it attempts something like "rm -f /mnt/boot/grub/*stage1_5" Carl / K0802647