Re: Redirecting $TEMP or a certain directory to /tmp

2010-01-18 Thread Christopher Faylor
On Mon, Jan 18, 2010 at 08:10:56AM +0100, Thomas Wiedmann wrote:
 In that case you probably are not running Cygwin 1.7.1.

That's true, I still run version 1.5.25-11.
Is there a way to use fstab in version 1.5.25-11?

No.

What's to do?

Follow the information at this link:

http://cygwin.com/ml/cygwin/2010-01/msg00714.html

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



Re: Redirecting $TEMP or a certain directory to /tmp

2010-01-17 Thread Thomas Wiedmann

In that case you probably are not running Cygwin 1.7.1.


That's true, I still run version 1.5.25-11.
Is there a way to use fstab in version 1.5.25-11?
What's to do?

Thomas Wiedmann


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



Re: Redirecting $TEMP or a certain directory to /tmp

2010-01-17 Thread Thorsten Kampe
* Thomas Wiedmann (Mon, 18 Jan 2010 08:10:56 +0100)
 
  In that case you probably are not running Cygwin 1.7.1.
 
 That's true, I still run version 1.5.25-11.
 Is there a way to use fstab in version 1.5.25-11?
 What's to do?

In case you missed it the first time: MAN MOUNT


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



Re: Redirecting $TEMP or a certain directory to /tmp

2010-01-15 Thread Corinna Vinschen
On Jan 15 07:53, Thomas Wiedmann wrote:
 mount -f E:/Temp /tmp
 Thanks, that worked.
 
 And, if you want this to be permanent you need to *put* it in
 /etc/fstab.
 My /etc directory in Cygwin has no fstab.
 Can I create it manually in Cygwin and does it work like in
 LINUX/UNIX or are additional steps be required?

Did you try the User's Guide?
http://cygwin.com/cygwin-ug-net/using.html#mount-table


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat

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



Re: Redirecting $TEMP or a certain directory to /tmp

2010-01-15 Thread Christopher Faylor
On Fri, Jan 15, 2010 at 07:53:43AM +0100, Thomas Wiedmann wrote:
 mount -f E:/Temp /tmp
Thanks, that worked.

 And, if you want this to be permanent you need to *put* it in
 /etc/fstab.
My /etc directory in Cygwin has no fstab.
Can I create it manually in Cygwin and does it work like in LINUX/UNIX or 
are additional steps be required?

In that case you probably are not running Cygwin 1.7.1.

cgf

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



Re: Redirecting $TEMP or a certain directory to /tmp

2010-01-14 Thread Thomas Wolff

Thomas Wiedmann wrote:
how can in Cygwin the directory, which is in Windows configured as 
$TEMP, or

a certain other directory, be redirected to /tmp?


man mount


... didn't work: I tried
 mount -f E:\Temp /tmp

mount -f 'E:\Temp' /tmp
to escape the backslash

--
Thomas

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



Re: Redirecting $TEMP or a certain directory to /tmp

2010-01-14 Thread Corinna Vinschen
On Jan 14 11:28, Thomas Wolff wrote:
 Thomas Wiedmann wrote:
 how can in Cygwin the directory, which is in Windows
 configured as $TEMP, or
 a certain other directory, be redirected to /tmp?
 
 man mount
 
 ... didn't work: I tried
  mount -f E:\Temp /tmp
 mount -f 'E:\Temp' /tmp
 to escape the backslash

Use the forward slash, just like in /etc/fstab:

  mount -f E:/Temp /tmp

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat

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



Re: Redirecting $TEMP or a certain directory to /tmp

2010-01-14 Thread Christopher Faylor
On Thu, Jan 14, 2010 at 01:37:30PM +0100, Corinna Vinschen wrote:
On Jan 14 11:28, Thomas Wolff wrote:
 Thomas Wiedmann wrote:
 how can in Cygwin the directory, which is in Windows
 configured as $TEMP, or
 a certain other directory, be redirected to /tmp?
 
 man mount
 
 ... didn't work: I tried
  mount -f E:\Temp /tmp
 mount -f 'E:\Temp' /tmp
 to escape the backslash

Use the forward slash, just like in /etc/fstab:

  mount -f E:/Temp /tmp

And, if you want this to be permanent you need to *put* it in
/etc/fstab.

cgf

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



Re: Redirecting $TEMP or a certain directory to /tmp

2010-01-14 Thread Thomas Wiedmann

mount -f E:/Temp /tmp

Thanks, that worked.


And, if you want this to be permanent you need to *put* it in
/etc/fstab.

My /etc directory in Cygwin has no fstab.
Can I create it manually in Cygwin and does it work like in LINUX/UNIX or 
are additional steps be required?


Thomas Wiedmann 




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



Re: Redirecting $TEMP or a certain directory to /tmp

2010-01-13 Thread Thomas Wiedmann
how can in Cygwin the directory, which is in Windows configured as $TEMP, 
or

a certain other directory, be redirected to /tmp?


man mount


... didn't work: I tried
 mount -f E:\Temp /tmp

Afterwards the /tmp directory was still C:\Programme\Cygwin\tmp
and the command 'mount' didn't list the assignment of /tmp.

Thomas Wiedmann 




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



Re: Redirecting $TEMP or a certain directory to /tmp

2010-01-12 Thread Thorsten Kampe
* Thomas Wiedmann (Tue, 12 Jan 2010 08:24:57 +0100)
 
 how can in Cygwin the directory, which is in Windows configured as $TEMP, or 
 a certain other directory, be redirected to /tmp?

man mount


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



Re: Redirecting $TEMP or a certain directory to /tmp

2010-01-12 Thread Lee Rothstein

Thorsten Kampe wrote:

 Thomas Wiedmann (Tue, 12 Jan 2010 08:24:57 +0100) wrote

 how can in Cygwin the directory, which is in Windows configured as 
$TEMP, or

 a certain other directory, be redirected to /tmp?

 man mount

My approach is different, I solve the problem on the Windows side for all
apps, Cygwin, or Windows.

My system is Visa 64b; others use a slightly different menu
sequence, but:

 Control Panel - System - Advanced system settings -
   Environment Variables - System Variables -
   TEMP == %TMPDIR%
 and  ...-
   TMPDIR ==  c:\_0\tmp
and (because some pseudo *nix apps for Windows use $TMP, instead of $TMPDIR:
  ...-
   TMP == %TMPDIR%

(since Cygwin root on my system is at 'c:\_0')

My approach means that both Windows and Cygwin apps use the same
directory for temporary files. This means I only have to clean up
or search in one temporary directory.


I also use the attached script, 'tmpdir', when I'm using the temporary
directory with unknown *NIX configs.

It has it's own help (-h|--help).

As always, YMMV.
#!/bin/bash

# tmpdir: resilient TeMPorary Directory Inquisition Reporter

# 'tmpdir' finds a master temporary directory (MTD) -- the directory in
# which temporary files and directories of an appication's session are
# stored. With certain options, it will create the directory.

# By Lee Rothstein, 2009-02-07 11:56

ProgName=tmpdir
Version=0.4.0
UpDate=2009-05-10

HelpEm () {
less  !!!EOF!!!
NAME

  tmpdir - *resilient* TeMPorary Directory Intantiator/Reporter

DESCRIPTION

  'tmpdir' finds a master temporary directory (MTD) -- the
  directory in which temporary files and directories of an
  application's session are stored. With certain options it will
  create (recursively, i.e., 'mkdir - p') the directory.

  In most GNU, UNIX, BSD, Linux, Cygwin and Posix systems, the
  MTD is either /tmp, or the directory referenced by $TMPDIR. In
  Cygwin, a likely additional possibility is the directory
  referenced by $TEMP.

  Normally, 'tmpdir' will be used by another script. Practical
  uses for this utility include:

  * If you're writing scripts for unknown users and are unsure of
their environment, 'tmpdir' might be one element of a
foolproof approach. Alas, however, fools are such clever
creatures; witness, George W. Bush (or, at least, George W.
Bush with Karl Rove's help).

  * Creating a more private MTD for a specific application or
session.

 SYNOPSIS

   tmpdir -h
   tmpdir [ [-c] [-f TEMPDIRECTORY] [-l TEMPDIRECTORY] ]

 OPTIONS

   Each option is mutually exclusive of the others.  (That is,
   only one can be used per invocation of 'tmpdir'.) Every option
   besides '-h' requires TEMPDIRECTORY.  Any option must be
   specified before a TEMPDIRECTORY is provided.

   -h | --help -- Help -- Provide this help. Take no other
 actions. Exit code = '99'. 'tmpdir' does not use nor
 check for any other arguments, when '-h', or '--help' is
 specified.

 Note: no other long option names are supported.

   -c -- Create a specified temporary directory. Abort if
 directory already exists.

   -f -- Force -- Force the use of the specified directory
 whether or not it pre-exists. (This option will not
 delete a file that prevents the creation of a directory
 by the same name. Ergo, even The Force is limited in
 its power ;-) )

   -l -- Last resort -- Go through the normal sequence of
 temporary directory investigation.  If none is found,
 try TEMPDIRECTORY, if it doesn't exist create it
 (recursively, i.e., 'mkdir -p').

   With the exception of help, long option syntax is not
   supported!

 USAGE

   Rules:

   * Almost any name acceptable to the file system is acceptable
 as TEMPDIRECTORY, except one beginning with a dash.  This is
 done for four reasons:

  It makes option sanity checking easier.
  The user is very likely making a mistake about options
   usage.
  It's very bad form. MTDs beginning with '-' would likely
   cause problems later when 'tmpdir' was used in a script.
  If you don't like it, you can always change it, it's just
   a script.

   * Success is finding or creating an MTD -- return value == 0.

   * Whenever it succeeds, and returns '0', it 'stdouts' the name
 of that directory.

   * Failure for any operational reason returns '1'. 'stdout' is
 null. Failure means there is not a temporary directory, of
 any kind, to be found.

 The help option exits with a return code of '99'. Errors
 in command line specification also return 90 series numbers.
 Help is directed to 'stdout' piped through 'less'.

   * Error messages are limited in size and always directed to
 'stderr'.

   * Directories are only created if one of the options is used.

   * '-c' will create a directory (recursively, i.e., 'mkdir -p')
 if one