bash: mongodb/bin/mongod : No such file or directory - mongodb

I'm trying to install and run some basic commands on mongodb from this tutorial (on page 4).
So far,
I've downloaded the a 32-bit zip file from the mongodb download page.
I've unzip the file in the following locations home/user1 then renamed it to mongodb
I've create a folder called data then another one inside called db
I've created a file name mongodb.config containing the path of the folder where I want to store my data, which is mongodb/data/db.
But when I run the command to start the server:
user1#user1-VirtualBox: ~$ mongodb/bin/mongod --dbpath ~mongodb/data/db
I'm getting the following error:
bash: mongodb/bin/mongod : No such file or directory
Am I missing something?

Missing a '/', it should be ~/mongodb/data/db, not '~mongodb/data/db'

Related

Postgresql copy command not finding file

when running:
~/fidelity/releases/20220907033831$ ls -a
.
..
.browserslistrc
221005_users_all.csv
_private
the presence of a file is confirmed.
However, when launching a postgresql command
psql fidelity_development
COPY users (id,migrated_id,[...]) FROM '~/fidelity/releases/20220907033831/221005_users_all.csv' DELIMITER ';' CSV HEADER;
The response is unexpected:
ERROR: could not open file "~/fidelity/releases/20220907033831/221005_users_all.csv" for reading: No such file or directory
What am I missing to determine why postgresql cannot see this file?
note this directory was also simlinked as fidelity/current and the same result was obtained when referring to that directory for the file, whereas bash sees it.
Use \COPY command as this one is client based and handles the local path correctly.
While COPY is server based and this could cause issues finding your file.

docker-compose cannot find the yaml file

I've placed a docker compose file project.yaml at the location /etc/project/project.yaml
the file and well as the project directory have the same file permission, i.e. -rxwrxxrwx
but when I run docker-compose
sudo docker-compose -f ./project.yaml up -d
if errors out with the following
Cannot find the file ./project.yaml
I have checked various times and it seems there is no permission issue. Can anyone tell why we have this problem and what would be the solution
Beside using the full path, as commented by quoc9x, double-check your current working directory when you call a command with a relative path ./project.yaml
If you are not in the right folder, that would explain the error message.

"No such file or directory" when importing local file into docker container using docker exec

When running a shell command in docker exec with a local file as an argument, it fails with
-bash:  docker/mongo.archive: No such file or directory
$ docker exec -i 4cb4a63af40c sh -c 'mongorestore --archive' < 'docker/mongo.archive'
-bash:  docker/mongo.archive: No such file or directory
However, the file clearly exists at the given location:
$ ls docker/mongo.archive
docker/mongo.archive
I remember using the exact same command and it worked. Also, I tried calling the command from within its directory (./docker) as well as from outside, using relative paths. Using the absolute path fails as well. Any ideas?
Remark: 4cb4a63af40c is a mongodb container.
Adjust the quotes
docker exec -i 4cb4a63af40c sh -c 'mongorestore --archive < docker/mongo.archive'

install4j: Installation doesnt create an alternativeLogfile

When i Invoke the installer with:
installerchecker_windows-x64_19_2_1_0-SNAPSHOT.exe
-q
-c
-varfile install.varfile
-Dinstall4j.alternativeLogfile=d:/tmp/logs/installchecker.log
-Dinstall4j.logToStderr=true
it creates and writes the standard log file installation.log in the .install4j Directory, but doesnt create my custom log in d:/tmp/logs. As configured there is an additional error.log with the correct content.
The installation.log shows the comand-line config : install4j.alternativeLogfile=d:/tmp/logs/installchecker.log
The Directory d:/tmp/logs has full access.
Where is the failure in my config ?
The alternative log file is intended to debug situations where the installer fails. To avoid moving the log file to its final destination in .install4j/installation.log, the VM parameter
-Dinstall4j.noPermanentLogFile=true
can be specified.

How to create dmg file in Centos through command line

I want to create a dmg file of three files in centos . i am using hfsutils commands, but it is showing errors like "No known volumes; use `hmount' to introduce new volumes". I googled a lot to get clear steps for creating dmg. some one who knows these steps please post here
Say if you want to create dmg of three files named file1,file2,file3.keep these three in one directory
Should run this command in the directory where we kept our three files
dd if=/dev/zero of="example.dmg" bs=1M count=10
hformat -l "example" ./"example.dmg"
A dmg file will be formed in our directory. next go to /usr/sbin from there run and then
1)hmount /directorypath/example.dmg
2)hcopy /directorypath/file1 example:
3)hcopy /directorypath/file2 example:
4)hcopy /directorypath/file3 example:
5)humount and then copy this file in to your mac system and open the dmg file,you will find all your three files in it.
You can use this command:
genisoimage -D -V "Volume Label" -no-pad -r -apple -o <dest.dmg> <src>
Here is more.