I just installed Oracle, and I am working with SQL*Plus because the GUI tool, SQL Developer, won't work.
I need to run some scripts, and I found that after starting SQLPlus I couldn't navigate from a session to another directory. The instructions that I did find after I searched on the internet all talk about a gui interface to SQLPlus which is no longer available on version 11. All what I get is a console window.
Right now I hacked my way into making it work for me by creating a shortcut and then changing the starting directory to the directory where the scripts are housed.
I can keep doing this, but I would like to know if there is a command that will let me know a) the current working directory and b) how to change directories
Thanks in advance,
Hugo
In UNIX/Linux and Windows it is fastest to simply exist SQL*Plus, cd to the appropriate directory and re-enter SQL*Plus.
The pwd command can be used to determine the present working directory. and the cd command can be used to change the current working directory.
It changes the place where settings are stored. Connections are stored in this directory by default, but if you want to make sql developer store scripts in this directory you still have to go to Tools>Preferences>Database>Worksheet and change "Select default path to look for scripts".
cd - Changing Directories You can use the cd command, which stands for Change Directory. From within ~ , our home directory, at our prompt $ , we type cd Desktop . Our terminal will change the directory and enter our Desktop folder and our prompt will now indicate that our working directory is ~/Desktop .
Try: host pwd
and host cd somedir
. You can also enter just host
to get a command prompt.
Also, help
is your friend.
The host command runs a subshell under unix. Thus, cd
will change the directory in the subshell, but not for SQL*Plus itself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With