Greetings, Fergus Daly!

> For years I have overwritten the content of the default /etc/fstab with the 
> one-liner
> none / cygdrive binary 0 0
> thus allowing drivenames of the style /d/ instead of /cygdrive/d/
> which syntax is (2nd) shorter but mainly (1st) easily mimics Linux syntax 
> making scripts
> mutually transferable.
> However using the syntax /?/ to address all drives as in (say)
> $ rm -vrf /?/today/tmp
> or all similar, fails. Is there a way to render /?/ intelligible to Cygwin
> (maybe by rewriting /etc/fstab, again)?

rm -rf /proc/cygdrive/?/today/tmp

But I advise against such wildcards, as these drives could be inaccessible,
locking you out of console for hours.

Also, cygwin ignores device type field when mounting paths. Effectively, you
could use "bind", which is closer to what actually happens.

>> # /etc/fstab
>> #
>> #    This file is read once by the first process in a Cygwin process tree.
>> #    To pick up changes, restart all Cygwin processes.  For a description
>> #    see https://cygwin.com/cygwin-ug-net/using.html#mount-table
>>
>> # This is default anyway:
>> #none /cygdrive cygdrive binary,posix=0,user 0 0
>> none /mnt cygdrive noacl,binary,nouser,posix=0 0 0
>> W:/ /run bind acl,binary,nouser,posix=0 0 0
>> none /tmp usertemp binary,user,posix=0 0 0

Also, I would strongly advise against what you are doing (Re: your other
reply).
Specifying "C:" instead of "C:\" (or, well, "C:/", which is synonymous)
introduces ambiguity. Drive specification without a path points to "current
path" on a specified drive. Which is not necessarily a root path.


-- 
With best regards,
Andrey Repin
Friday, April 25, 2025 10:52:48

Sorry for my terrible english...


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

Reply via email to