rm does not remove; ls tem* does not find temp; echo ~foo

Tolkin, Steve Steve.Tolkin@fmr.com
Fri Jun 2 15:36:00 GMT 2000


The following transcript shows a variety of odd behavior.
This is all cygwin 1.1.0 on NT 4.0

1. The rm command may fail withotu an error message
Some of the time this might be due to a leading ~ in a file name.
2. Echo ~foo produices no output at all -- is this correct?
3.  Why doesn't ls tem* find the directory named temp ?

Note that I have alias ls='ls -laF'

My commentary is preceded by --

579/temp> ls
total 394
drwxrwxrwt   3 administ SYSTEM      32768 Jun  2 13:39 ./
drwxrwxrwt  46 administ Administ    45056 Jun  2 13:39 ../
-rwxrwxrwx   1 administ None            0 May 31 15:13 JET1B.tmp*
drwxrwxrwx   2 administ Administ     4096 Jun  2 13:39 dbi/
-rwxrwxrwx   1 administ None         1536 Jun  1 13:53 ~DF7FE0.tmp*
-rwxrwxrwx   1 administ None       721408 Jun  2 12:46 ~DF7FEA.tmp*
580/temp> rm *.tmp

-- No error message but the files are still there !

581/temp> ls
total 394
drwxrwxrwt   3 administ SYSTEM      32768 Jun  2 13:39 ./
drwxrwxrwt  46 administ Administ    45056 Jun  2 13:39 ../
-rwxrwxrwx   1 administ None            0 May 31 15:13 JET1B.tmp*
drwxrwxrwx   2 administ Administ     4096 Jun  2 13:39 dbi/
-rwxrwxrwx   1 administ None         1536 Jun  1 13:53 ~DF7FE0.tmp*
-rwxrwxrwx   1 administ None       721408 Jun  2 12:46 ~DF7FEA.tmp*
582/temp> rm -f *.tmp

-- Adding -f made no difference

583/temp> ls
total 394
drwxrwxrwt   3 administ SYSTEM      32768 Jun  2 13:39 ./
drwxrwxrwt  46 administ Administ    45056 Jun  2 13:39 ../
-rwxrwxrwx   1 administ None            0 May 31 15:13 JET1B.tmp*
drwxrwxrwx   2 administ Administ     4096 Jun  2 13:39 dbi/
-rwxrwxrwx   1 administ None         1536 Jun  1 13:53 ~DF7FE0.tmp*
-rwxrwxrwx   1 administ None       721408 Jun  2 12:46 ~DF7FEA.tmp*
584/temp> rm ~DF7FE0.tmp
rm: too few arguments
Try `rm --help' for more information.

-- I start to suspect the leading tilde

585/temp> echo ~DF7FE0.tmp


-- Well there is something funny here with the tilde!
-- But I get a similar failure on files without a tilde also!

586/temp> rm JET1B.tmp
587/temp> ls
total 394
drwxrwxrwt   3 administ SYSTEM      32768 Jun  2 13:39 ./
drwxrwxrwt  46 administ Administ    45056 Jun  2 13:39 ../
-rwxrwxrwx   1 administ None            0 May 31 15:13 JET1B.tmp*
drwxrwxrwx   2 administ Administ     4096 Jun  2 13:39 dbi/
-rwxrwxrwx   1 administ None         1536 Jun  1 13:53 ~DF7FE0.tmp*
-rwxrwxrwx   1 administ None       721408 Jun  2 12:46 ~DF7FEA.tmp*

-- no funny characters in that one explicitly named file 
-- rm failed to remove it and still no error message.

588/temp> echo ~
/usr/home
589/temp> echo ~a

-- A blank line is emitted.  Why?

Why can't ls tem* see temp ???!!!
602/temp> cd /
603/> ls -ld tem*
ls: tem*: No such file or directory
604/> ls -ld tem?
ls: tem?: No such file or directory
605/> ls -ld tem.*
ls: tem.*: No such file or directory
606/> ls -ld temp
drwxrwxrwt   2 administ SYSTEM      32768 Jun  2 13:46 temp/

 
Hopefully helpfully yours,
Steve
-- 
Steven Tolkin          steve.tolkin@fmr.com      617-563-0516 
Fidelity Investments   82 Devonshire St. R24D    Boston MA 02109
There is nothing so practical as a good theory.  Comments are by me, 
not Fidelity Investments, its subsidiaries or affiliates.


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com



More information about the Cygwin mailing list