Mongodb database tool commands wont take effect - mongodb

I want to use commands such as mongodump/mongorestore/mongoexport on my local windows computer and have therefor downloaded the .msi extension version of mongodb database tool and also executed the .msi so it could be installed.
But what do i do now to start using the commands. I cant find any documentaions of this. Is there something i have to configue?
When i execute a command like mongodump on my system command line i get the response:
'mongodump' is not recognized as an internal or external command, operable program or batch file.
Do i maybe have to execute the command from a certain dir location?

Look for the highlighted folder on your system. When you install the database tools this folder is created. Inside this folder there is a bin folder which contains all the commands you are looking for.
Once you find this folder then navigate to bin folder. And open a command prompt at that location. And try running the commands.
Alternatively:-
You can set PATH to bin folder and then you will be able to run the commands from anywhere.

Related

Swift on Ubuntu 20.04- Need to add a path every time

I am simply trying to install swift on linux
I have downloaded the files from swift.org, extracted .tar files and used export command to include the path after that when I use swift --version it correctly shows the version 5.3.3 but when I close the terminal and try to open the swift command terminal it says command not found.
What is happening here? I need to include the path every time I open the terminal.
The export command just adds the value to path for the current session. When you log out and in again, it will reset.
You need to add this to your shell resource file so that it gets added to the path every time you log in. The file you need to edit will be called .zshrc or .bash_profile or something similar. You should start by opening the command line on your computer and verifying what shell you are running by typing:
echo $SHELL
This will return something like /bin/ksh or /bin/bash or similar. Then do a little internet searching to find out what the resource file is called for that shell. Then edit your resource file to add the Swift path to your $PATH.

'raco' is not recognized on the windows 10 command line

I'm trying to get familiar with DrRacket plugin framework, and I'm using the following tutorial:
https://lang.video/blog/2018/03/21/making-an-ide-plugin-for-drracket/
I'm stuck at the step where raco is used:
When i run the command, my windows 10 operating system gives back the following error message, How can i solve this?:
'raco' is not recognized as an internal or external command,
operable program or batch file.
second question:
I've also tried putting the clippy folder into a folder within my program files, in the DrRacket installation. Is this the location where Racket Plugins should reside, or can they be placed in any folder?
Add racket and raco to your Windows PATH (the directories in which Windows looks for commands).
https://beautifulracket.com/setting-the-windows-path.html

How to run a Windows command from any folder?

Some CLI commands work from only specific folders; I want to make them run globally, from anywhere.
I installed redis-cli.exe in the path c:/redis/redis-cli.exe.
Now when I open a cmd in c:/redis/ and run redis-cli ping, it works.
However, if I run it from some other folder, it throws an error saying
'redis-cli' is not recognized as an internal or external command, operable program or batch file.
In contrast, Chocolatey or npm runs from a cmd console opened in any folder.
Solution: Add the path to that exe in your environment variables.
So for c:/redis/redis-cli.exe, add the value c:/redis to PATH in your environment variables.

How to make custom global command in VS Code terminal?

I just installed MongoDB. Instead of writing annoying cd to mongod.exe every time I want to run MongoDB, I want this file to be available as a global command, so that it runs regardless of the directory I'm in, like node or npm or git. How do I accomplish this for VS Code terminal?
There are different approaches to start mongod.exe:
You could add mongod.exe to your system's PATH variable (like git, npm etc.)
You could create a script (for example a .bat) file in your workspace directory, that contains
Start "path/to/mongod.exe"
If you want to start the mongod.exe via a vscode command like Strg + P for the user settings, you need to write an extension and register a command.

Batch file in eclipse path variables not found

I want to start a batch-script in my eclipse. (Instructions here: How to run a batch script (.bat file) from eclipse)
In my batch file i need some commands like pear or phing.
I put the path to these commands into my environment variable called PATH.
(Works fine with cmd manually)
After starting the script, I'm getting this error:
'pear' is not recognized as an internal or external command,
operable program or batch file.
If I type pear by hand, it doesn't work either.
You need to restart Eclipse after changing the system environment; environment variable changes requires any process that is already running to be restarted in order for that application to pick up the changes.
Another option might be to put the full path to those commands in the .bat file so that it doesn't rely on the system environment in order to work properly.
Tip: Make sure to close and start eclipse afresh for PATH variable changes to take effect. Using the Restart option in File menu may not help here.