Joolz wrote:
Just a moment ago something weird happened. I was cleaning up files and noticed a very strange behaviour of the rm command. AFAIK Linux is case-sensitive, so you van have three files TeST, test and TEST in one directory. But I deleted more than I wanted to (no big deal, rm is the issue)
So I tried this:
#!/bin/bash touch TEST touch TeST touch test ls # all three are there rm te* ls # ALL THREE ARE GONE???
IMO this is _very_ dangerous behaviour, one would expect Linux command to be compatible with the Linux filesystem (maybe rm is a port of del :-\)
Is this a known issue? Right know I have only Fedora at hand, but I wonder if other distro's have it too.
Ok, so you made me nervous. I tried it on several machines:
[tcurrie@hamster tmp]$ touch TEST [tcurrie@hamster tmp]$ touch TeST [tcurrie@hamster tmp]$ touch test [tcurrie@hamster tmp]$ ls test TeST TEST [tcurrie@hamster tmp]$ rm te* [tcurrie@hamster tmp]$ ls TeST TEST [tcurrie@hamster tmp]$
...works fine on RedHat 9.0...
tcurrie@nakedpc:~/tmp$ touch test tcurrie@nakedpc:~/tmp$ ls TEST TeST test tcurrie@nakedpc:~/tmp$ rm te* tcurrie@nakedpc:~/tmp$ ls TEST TeST tcurrie@nakedpc:~/tmp$
...Slackware 9.0 has no problem with it, and last but not least,
[tcurrie@localhost tmp]$ touch test [tcurrie@localhost tmp]$ ls test TeST TEST [tcurrie@localhost tmp]$ rm te* [tcurrie@localhost tmp]$ ls TeST TEST [tcurrie@localhost tmp]$
...a fresh install of Fedora Core 1 has no problem with it. Are you sure you're not doing something strange here? What is the underlying filesystem (ext2, ext3, reiserfs)? How are you accessing this? NFS? Samba?
-Tim
-- Proprietary software is like petrified wood. It used to be alive, but then it was fixed in time and put in a box. GNU/Linux software, in contrast, is alive, always changing and improving. I love that it's more a process than a product. - Pamela Jones, Groklaw