Thank you.
/usr/local/var does indeed exist - perhaps it was created during the
MySQL setup (all of the files in it -- using 'sudo ls...' -- are
MySQL files). I want to be able to get to this file (and the
directory) so that I can create a file directly from MySQL (or read
one in from a tab-delimited file). I could do some of this in perl,
but MySQL allows me to create a textfile right from the command line.
I could change the MySQL config file, but prefer to leave it in the
default mode.
I tried using 'su' as you suggested. It prompts me for a password
and I used the same one that I created initially to set up my admin
account (I have not enabled root) - which I have used to install
software using 'sudo' - however I get the response 'Sorry' and I'm
not given access. I also tried it with no password at all, and I
tried a few other things, as below:
[localhost:~] nelson% su
Password:
Sorry
[localhost:~] nelson% su cd /usr/local/var
su: unknown login cd
[localhost:~] nelson% sudo cd /usr/local/var
sudo: cd: command not found
Is there some OTHER password that I'm not aware of?
Thanks for the help on the 'find' command - though it won't look into
the 'usr/local/var' directory (permission denied), though making it
an 'sudo ...' command DID work:
[localhost:/usr/local] nelson% sudo find / -print | grep bubba
/usr/local/var/coloradofilm/bubbafile
I have a little Unix reference (Unix in a Nutshell, which is an
excellent quick reference to shells, vi, emacs and other aspects of
Unix), but just wasn't thinking - someone had suggested 'locate' and
I was fixated on that - it's in system but doesn't seem to do
anything.
>Nelson Goforth writes:
> : I'm running MySQL on OS X and have just tried writing to an OUTFILE,
> : but I can't get to it.
> :
> : I guessed it was in the directory /usr/local/var but I couldn't 'cd'
> : to that directory (permission denied), even using the command:
> :
> : sudo cd /usr/local/var
>
>try su
>
>this will actually change who you are to the root user.
>then just type
>
>cd /usr/local/var
>
>BUT: there is no /usr/local/var on my macosx machine, so maybe you got
>a directory not found error.
>
> : and got some sort of error (other than permission denied) but I
> : finally tried 'sudo ls -al /usr/local/var/databasename/' and found
> : the file. Difficulty now is how do I get at it?
>
>Why do you want to get this file?
>
>
> : In a semi-related question, how can I do a "Find" for the Unix files.
> : I tried "locate", but with no luck.
>
>type man find at your shell prompt
>
>here's a sample usage.
>
>find / -print | grep file.i.want
>
>all this is easy from emacs. if you plan to use unix, get a good book
>on unix and learn emacs. these 2 will take you a long way.
--
=============================================
Nelson Goforth Lighting for Moving Pictures
phone: 01.303.322.5042 pager: 01.303.634.9733
resume: http://www.earthnet.net/~ngoforth/film