RE: How to delete rogue nul files

2004-07-22 Thread Trevor Forbes

I just use a freeware tool...

http://www.purgeie.com/delinv.htm

Trevor

 


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: How to delete rogue nul files

2004-07-22 Thread zzapper
Hi,
I would like to declare this the NUL-est thread ever, and would like to thank you 
NUL-experts for
your NUL-help.

Seriously I've now learnt how to delete those pesky undeletable windows files namely

DEL \\.\c:\somedir\nul


or delinvfile.exe (google for this utility)

And also the conundrum that ls -l nul will ALWAYS list a file
zzapper (vim, cygwin, wiki  zsh)
--

vim -c :%s/^/WhfgTNabgureRIvzSUnpxre/|:%s/[R-T]/ /Ig|:normal ggVGg?

http://www.vim.org/tips/tip.php?tip_id=305  Best of Vim Tips


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



RE: How to delete rogue nul files

2004-07-22 Thread Dave Korn
 -Original Message-
 From: cygwin-owner On Behalf Of Larry Hall
 Sent: 22 July 2004 03:01

 You can use '.' in place of '?'.


[ Insert here quick discussion of difference between a UNC path to the local
host's redirector and a softlink in the root of the object namespace
hierarchy to the DosDevices subdir that contains softlinks to the actual
hard devices. ]

[ Then take it out again, because it's all a bit too win-specific and
getting OT for this list. :-o ]


cheers, 
  DaveK
-- 
Can't think of a witty .sigline today


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: How to delete rogue nul files

2004-07-22 Thread zzapper
Hi,
I would like to declare this the NUL-est thread ever, and would like to thank you 
NUL-experts for
your NUL-help.

Seriously I've now learnt how to delete those pesky undeletable windows files namely

DEL \\.\c:\somedir\nul


or delinvfile.exe (google for this utility)

And also the conundrum that ls -l nul will ALWAYS list a file
zzapper (vim, cygwin, wiki  zsh)
--

vim -c :%s/^/WhfgTNabgureRIvzSUnpxre/|:%s/[R-T]/ /Ig|:normal ggVGg?

http://www.vim.org/tips/tip.php?tip_id=305  Best of Vim Tips


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



RE: How to delete rogue nul files

2004-07-21 Thread Dave Korn
 -Original Message-
 From: cygwin-owner On Behalf Of zzapper
 Sent: 21 July 2004 17:13

 Hi,
 
 I recently seem to be leaving nul files around my file system 
 which I cannot delete from Cyg or Win
  
 Hilfe mich!

http://www.google.com/search?q=rm+delete+nul+com+file+site:cygwin.comhl=en;
lr=ie=UTF-8filter=0

Executive summary:

DEL \\.\c:\somedir\nul

cheers, 
  DaveK
-- 
Can't think of a witty .sigline today


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: How to delete rogue nul files

2004-07-21 Thread Eric Hanchrow
I've been using this:

#!/usr/bin/env perl

use warnings;
use strict;
use Data::Dumper;

die This program is only useful on Cygwin.\n
  unless ($^O eq cygwin);

my $filename = shift;

$filename =~ s(/nul$)()i;

$filename = qx(realpath $filename); chomp $filename;
$filename = qx(cygpath -w $filename);   chomp $filename;
$filename = q(.\\) . $filename;
$filename .= \\nul;

if (unlink $filename) {
  print Removed $filename.\n;
} else {
  warn Can't unlink $filename: $!;
}

-- 
A DRE voting system is one of the simplest computer
applications you could imagine.  It just adds by one.
-- Brit Williams, emeritus professor of computer science


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: How to delete rogue nul files

2004-07-21 Thread zzapper
On Wed, 21 Jul 2004 18:14:45 +0100,  wrote:


 
 I recently seem to be leaving nul files around my file system 
 which I cannot delete from Cyg or Win
  
 Hilfe mich!



DEL \\.\c:\somedir\nul

cheers, 
  DaveK

no luck

C:\inetpub\wwwdev\www.planet.comdel nul
The filename, directory name, or volume label syntax is incorrect.


zzapper (vim, cygwin, wiki  zsh)
--

vim -c :%s/^/WhfgTNabgureRIvzSUnpxre/|:%s/[R-T]/ /Ig|:normal ggVGg?

http://www.vim.org/tips/tip.php?tip_id=305  Best of Vim Tips


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: How to delete rogue nul files

2004-07-21 Thread Larry Hall
At 01:32 PM 7/21/2004, you wrote:
On Wed, 21 Jul 2004 18:14:45 +0100,  wrote:


 
 I recently seem to be leaving nul files around my file system 
 which I cannot delete from Cyg or Win
  
 Hilfe mich!



DEL \\.\c:\somedir\nul

cheers, 
  DaveK

no luck

C:\inetpub\wwwdev\www.planet.comdel nul
The filename, directory name, or volume label syntax is incorrect.


Use the syntax Dave suggested and you'll have better luck.




--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
838 Washington Street   (508) 893-9889 - FAX
Holliston, MA 01746 


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: How to delete rogue nul files

2004-07-21 Thread zzapper
On Wed, 21 Jul 2004 10:26:41 -0700,  wrote:

Eric I tried

#!/usr/bin/env perl

my $filename='nul';
if (unlink $filename) {
print Removed $filename.\n;
} else {
warn Can't unlink $filename: $!;
}

Said it had deleted  file but that was lie!!

zzapper (vim, cygwin, wiki  zsh)
--

vim -c :%s/^/WhfgTNabgureRIvzSUnpxre/|:%s/[R-T]/ /Ig|:normal ggVGg?

http://www.vim.org/tips/tip.php?tip_id=305  Best of Vim Tips


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



RE: How to delete rogue nul files

2004-07-21 Thread Dave Korn
 -Original Message-
 From: cygwin-owner On Behalf Of zzapper
 Sent: 21 July 2004 18:33

 On Wed, 21 Jul 2004 18:14:45 +0100,  wrote:

  I recently seem to be leaving nul files around my file system 
  which I cannot delete from Cyg or Win
   
  Hilfe mich!
 
 
 
 DEL \\.\c:\somedir\nul
 
 cheers, 
   DaveK
 
 no luck
 
 C:\inetpub\wwwdev\www.planet.comdel nul
 The filename, directory name, or volume label syntax is incorrect.

  Try del \\.\C:\inetpub\wwwdev\www.planet.com\nul, like I suggested.


cheers, 
  DaveK
-- 
Can't think of a witty .sigline today


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: How to delete rogue nul files

2004-07-21 Thread zzapper
On Wed, 21 Jul 2004 13:28:30 -0400,  wrote:

At 01:32 PM 7/21/2004, you wrote:
On Wed, 21 Jul 2004 18:14:45 +0100,  wrote:


 
 I recently seem to be leaving nul files around my file system 
 which I cannot delete from Cyg or Win
  
 Hilfe mich!



DEL \\.\c:\somedir\nul

cheers, 
  DaveK

no luck

C:\inetpub\wwwdev\www.planet.comdel nul
The filename, directory name, or volume label syntax is incorrect.


Use the syntax Dave suggested and you'll have better luck.

Larry 
That zeroed the file, but it's still undeletable. But what is that wierd delete 
syntax??


zzapper (vim, cygwin, wiki  zsh)
--

vim -c :%s/^/WhfgTNabgureRIvzSUnpxre/|:%s/[R-T]/ /Ig|:normal ggVGg?

http://www.vim.org/tips/tip.php?tip_id=305  Best of Vim Tips


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



RE: How to delete rogue nul files

2004-07-21 Thread Dave Korn
 -Original Message-
 From: cygwin-owner On Behalf Of zzapper
 Sent: 21 July 2004 18:51

  I recently seem to be leaving nul files around my file system 
  which I cannot delete from Cyg or Win

 DEL \\.\c:\somedir\nul

 no luck
 
 C:\inetpub\wwwdev\www.planet.comdel nul
 The filename, directory name, or volume label syntax is incorrect.

 Use the syntax Dave suggested and you'll have better luck.

 That zeroed the file, but it's still undeletable. But what is 
 that wierd delete syntax??

  Actually, it may have genuinely deleted it after all, but it might also
look as if it was still there, depending how you look.

  It's easy to think the file is still there if you look for it by doing ls
-l nul, because for some reason that will always succeed, regardless of
whether or not there actually is a nul-named file in the directory you're
looking in.  Compare the results of ls -l nul and ls -l | grep nul and
you'll see what I mean.



cheers, 
  DaveK
-- 
Can't think of a witty .sigline today
 



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



RE: How to delete rogue nul files

2004-07-21 Thread Buchbinder, Barry (NIH/NIAID)
At Wednesday, July 21, 2004 1:51 PM, zzapper wrote:
 On Wed, 21 Jul 2004 13:28:30 -0400,  wrote:
 
 At 01:32 PM 7/21/2004, you wrote:
 On Wed, 21 Jul 2004 18:14:45 +0100,  wrote:
 
 I recently seem to be leaving nul files around my file system
 which I cannot delete from Cyg or Win
 
 Hilfe mich!
 
 
 
 DEL \\.\c:\somedir\nul
 
cheers,
  DaveK
 
 no luck
 
 C:\inetpub\wwwdev\www.planet.comdel nul
 The filename, directory name, or volume label syntax is incorrect.
 
 
 Use the syntax Dave suggested and you'll have better luck.
 
 Larry
 That zeroed the file, but it's still undeletable. But what is that
 wierd delete syntax?? 

Are you sure that they are really there?  When you see them but cannot
delete them in windows, are you using cmd.exe or command.com or have you
tried in Windows Explorer?  Do you see them in Windows Explorer?  If not,
you have fallen into the following pitfall.

Many versions of DOS and Windows report the existence of NUL, AUX, and
other special file names in every directory.  But they are not really
there.  This allows

C:\path dir  nul

in any directory.  There is no C:\DEV in DOS/Windows to put nul/aux/etc.
into.

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: How to delete rogue nul files

2004-07-21 Thread zzapper
On Wed, 21 Jul 2004 19:05:05 +0100,  wrote:

 -Original Message-
 From: cygwin-owner On Behalf Of zzapper
 Sent: 21 July 2004 18:51

  I recently seem to be leaving nul files around my file system 
  which I cannot delete from Cyg or Win

 DEL \\.\c:\somedir\nul

 no luck
 
 C:\inetpub\wwwdev\www.planet.comdel nul
 The filename, directory name, or volume label syntax is incorrect.

 Use the syntax Dave suggested and you'll have better luck.

 That zeroed the file, but it's still undeletable. But what is 
 that wierd delete syntax??

  Actually, it may have genuinely deleted it after all, but it might also
look as if it was still there, depending how you look.

  It's easy to think the file is still there if you look for it by doing ls
-l nul, because for some reason that will always succeed, regardless of
whether or not there actually is a nul-named file in the directory you're
looking in.  Compare the results of ls -l nul and ls -l | grep nul and
you'll see what I mean.

DK,
ls -l | grep nul

Absolutely right, I could see that it had disappeared from Win, but was fooled into 
thinking I could
still see it in Cyg. 

What a wonderful conundrum!! Where are the nuls likely to have originated from??


Frustra laborant quotquot  fatigant deletum nul (Bad Latin)






zzapper (vim, cygwin, wiki  zsh)
--

vim -c :%s/^/WhfgTNabgureRIvzSUnpxre/|:%s/[R-T]/ /Ig|:normal ggVGg?

http://www.vim.org/tips/tip.php?tip_id=305  Best of Vim Tips


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: How to delete rogue nul files

2004-07-21 Thread Chuck McDevitt
While it's not hard to delete the rouge nul files, it is a recent change 
to cygwin that allows them to be created at all.

1.5.9 seemed to treat NUL in the normal windows way (equivalent of 
/dev/null), so didn't create these files.

1.5.10 changed so Cygwin no longer recognizes windows special file names 
like NUL, and instead treats them like normal files.

Is there a reason for this change?



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: How to delete rogue nul files

2004-07-21 Thread Igor Pechtchanski
On Wed, 21 Jul 2004, Chuck McDevitt wrote:

 While it's not hard to delete the rouge nul files, it is a recent change
 to cygwin that allows them to be created at all.

 1.5.9 seemed to treat NUL in the normal windows way (equivalent of
 /dev/null), so didn't create these files.

 1.5.10 changed so Cygwin no longer recognizes windows special file names
 like NUL, and instead treats them like normal files.

 Is there a reason for this change?

Read the thread that Dave Korn pointed to.  It was a bug in Cygwin 1.5.10.
The bug was fixed in CVS, and is not present in the latest snapshots.
The recipe for deleting the file was only needed for the systems that have
this bug.  FWIW, the 20040716 snapshot is pretty stable (I'm running it
now)...  YMMV...
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster.  -- Patrick Naughton

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: How to delete rogue nul files

2004-07-21 Thread Jan Engelhardt
 I've been using this:

Interesting. I would have booted Linux and removed 'nul' with its tools. :)


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: How to delete rogue nul files

2004-07-21 Thread Christopher Faylor
On Wed, Jul 21, 2004 at 09:58:37PM +, Jan Engelhardt wrote:
I've been using this:

Interesting.  I would have booted Linux and removed 'nul' with its
tools.  :)

Hmm.  I would have taken a very tiny magnet, pried open the cover of
the hard drive, and run the magnet over the part of the platter that
said nul on it.  I'd probably need a magnifying glass too, now that
I think of it.

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: How to delete rogue nul files

2004-07-21 Thread Larry Hall
At 01:50 PM 7/21/2004, you wrote:
On Wed, 21 Jul 2004 13:28:30 -0400,  wrote:

At 01:32 PM 7/21/2004, you wrote:
On Wed, 21 Jul 2004 18:14:45 +0100,  wrote:


 
 I recently seem to be leaving nul files around my file system 
 which I cannot delete from Cyg or Win
  
 Hilfe mich!



DEL \\.\c:\somedir\nul

cheers, 
  DaveK

no luck

C:\inetpub\wwwdev\www.planet.comdel nul
The filename, directory name, or volume label syntax is incorrect.


Use the syntax Dave suggested and you'll have better luck.

Larry 
That zeroed the file, but it's still undeletable. But what is that wierd delete 
syntax??


See documentation for CreateFile().

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/deletefile.asp

You can use '.' in place of '?'.  There's probably a better pointer out
there but that's the best one I can find quickly.



--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
838 Washington Street   (508) 893-9889 - FAX
Holliston, MA 01746 


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/