Does SQLite have a command which displays what directory I am working in on the command line?
Also, how to change work directory there?
sqlite3
does have the concept of a current directory (although it is "deferring" to the underlying shell); otherwise it wouldn't have a .cd DIRECTORY
command.
To mimic pwd
you can use:
sqlite> .shell pwd
/Users/brad/
The syntax is .shell CMD ARGS...
, which allows you to
Run
CMD ARGS...
in a system shell
To change the directory, use .cd
:
sqlite> .cd /Users/yourname/directory/
The .cd
command was added in version 3.20.0 (released 2017-08-01).
.shell cd
can help you to show the current directory.
For changing the directory, you are gonna need to set it up at the beginning.
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