It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
avatar
dtgreene: The effect I would expect for "copy con con" is that it would copy keyboard input to the screen (or the DOS terminal).
copy con filename.txt copies keyboard input to the file, but echos it on the screen. copy con con.any would attempt to copy the keyboard input to the keyboard and your keyboard stops working.

avatar
dtgreene: (Use Ctrl-D to type EOF so that the program will know to quit.)
In DOS you would use ^z for that. (Ctrl-Z)

avatar
dtgreene: I remember that cygwin would allow me to create files with those names, and when trying to delete them through WIndows Explorer would give strange error messages that didn't make any sense. (Can WSL create such files?)
Yup, that's exactly what some of those badly coded software do as well. Cygwin should not do that, but it does. Anyway, Win10 supports Linux now so Cygwin is pretty much dead. Does it still even exist?

Oh, if you have one of those folders, to remove it open cmd with admin rights and run rd "\\.\c:\foo\bar\con" /S /Q

Note: this command uses /S so you better be sure there's nothing valuable in that folder.
Post edited February 12, 2021 by frogthroat
avatar
dtgreene: (Use Ctrl-D to type EOF so that the program will know to quit.)
avatar
frogthroat: In DOS you would use ^z for that. (Ctrl-Z)
In Linux, ^z is used to suspend the current foreground process, allowing you to do other things before resuming it with the "fg" command, or to use the "bg" command to make it run in the background.

(It actually works by sending SIGSTOP to the process, which suspends it and can't be caught; sending this via killall or pkill is useful when chromium is making my desktop overheat.)

avatar
dtgreene: I remember that cygwin would allow me to create files with those names, and when trying to delete them through WIndows Explorer would give strange error messages that didn't make any sense. (Can WSL create such files?)
avatar
frogthroat: Yup, that's exactly what some of those badly coded software do as well. Cygwin should not do that, but it does. Anyway, Win10 supports Linux now so Cygwin is pretty much dead. Does it still even exist?

Oh, if you have one of those folders, to remove it open cmd with admin rights and run rd "\\.\c:\foo\bar\con" /S /Q

Note: this command uses /S so you better be sure there's nothing valuable in that folder.
Cygwin's DLL was last updated in July 2020, so it appears to still be active, and there've been package updates as recently as February 2021, so I'd say it's still active.

Also, it makes sense for Cygwin to allow creation of such files because it's meant to imitate POSIX and POSIX allows those filenames; if anything, I think Windows is to blame for making those files special in every directory, not Cygwin.

(Note that these files can be deleted with Cygwin's "rm" command (or "rmdir", if it's a directory) just fine.)
Post edited February 12, 2021 by dtgreene
avatar
dtgreene: Cygwin's DLL was last updated in July 2020, so it appears to still be active, and there've been package updates as recently as February 2021, so I'd say it's still active.
Interesting. I use the Ubuntu on Windows and have been using it since... um... like 4 years or something? When did it become available? Anyway, that's why I have Ubuntu -- it was the only one available at the time. And it does what I need so no need to change a working system. And I haven't touched Cygwin since. Haven't touched putty or WinSCP either. And that's why I had no idea if Cygwin is still even alive.