Can I launch pgAdmin3 from command line? - bash

Is there a way to launch pgAdmin3 from the Unix command line? I installed pgAdmin from pgadmin.org but I don't know where it was installed.
I've searched my /usr tree for pgadmin\* and pgAdmin\* to no avail.
I've also searched for the answer on the Internet but didn't find an answer.
The pgAdmin Command Line Parameters doc page discusses parameters you can use to launch pgAdmin but it doesn't discuss the executable itself.

Graphical utility is optional.
The link you are using describe only the graphical utility.
On linux you can use the psql command line parameters from this link:
https://www.postgresql.org/docs/9.2/static/app-psql.html
This link might be also usefull.
http://suite.opengeo.org/docs/latest/dataadmin/pgGettingStarted/firstconnect.html#dataadmin-pggettingstarted-firstconnect

For pgadmin4 for mac, you can find the location of psql binary.
sudo find / -name psql
In my case, I find it at:
/Applications/pgAdmin\ 4.app/Contents/SharedSupport/
Then you can build symbolic link from /usr/local/bin the above path.
ln -s /Applications/pgAdmin\ 4.app/Contents/SharedSupport/psql /usr/local/bin/psql
Then you can run psql anywhere in your terminal.

Like any program, you can launch it by calling its name:
pgadmin3 &
If it is not in one of the directories in your search path $PATH, you should use the complete pathname:
/path/to/the/program/pgadmin3 &

Related

Greadlink not working

recently I installed CoreUtils with HomeBrew for my terminal on macOS. However, when I use the greadlink command, I am unable to get the proper file path. What I mean to say is that every time I do the following:
My-MBP: insertnamehere$ greadlink -f something.apk
I get:
/Users/insertnamehere/projects/something.apk
When its actually located at:
/Users/insertnamehere/Documents/stuff/something.apk
The same happens for any directory. Basically, it will list the file that I'm trying to find directly under that directory.
Try using grealpath which gives more options like -P and -L etc.

Mac OSx 7zcat command not found

I am trying to execute a Makefile script and my Mac complains about 7zcat, although I already have 7z installed.
/bin/sh: 7zcat: command not found
Any thoughts on what's missing on my system? Thank you!
I have never used 7zcat before.
However, it looks like it needs to be installed on your system.
https://github.com/essentialkaos/7zcat
Also, after you download install 7zcat you have to give it execute permission with chmod. Finally, you have to execute it by calling its full path for example if you installed it to the directory you are in you would run ./7zcat file.7z or you would add the path to the file to your environment's $PATH variable.
I hope this helps. You might have to do some more research though.
When you open a Terminal window and type 7zcat and hit enter, what happens? Same message? Well, if you cannot use it, why should make be able to use it? Where and how have you installed 7z? Is the folder with the 7z binaries in your PATH? Since if it isn't, of course the command won't be found.
When the system shall run a command, it will search for this command in the directories stored in the PATH variable. Execute echo $PATH in terminal and you will get a colon separated list of directories; only these directories are searched for binaries. So either you must move your binaries to one of these (or put a symlink to one of these) or add the directory with these binaries to the PATH.
Yet there is no official 7z command line installer for MacOS, which brings me back to the original questions "Where and how have you installed 7z?" And are you sure that whatever you installed even includes a 7zcat?

Created symbolic link is not searchable?

I don't know what is wrong here, I just created a symbolic link in my Mac's terminal as follow:
sudo ln -s ../../System/Library/Frameworks/Accelerate.framework/Versions/Current/Frameworks/vecLib.framework/Versions/Current/libBLAS.dylib /usr/lib/libatlas.dylib
And when I search libatlas.dylib the locate command can't find it:
locate libatlas.dylib
No results for the locate command. Any hint or remark are welcome. thanks
locate doesn't search your file system; it merely reports what it finds in the database refreshed by updatedb (which is run periodically by cron). Either run updatedb manually, or wait until the next time your system runs it. Then locate should find the file.
You presumably want to create an absolute symlink to a library so why the ../.. ?
Symlinks store whatever you give them

Can't create a symbolic link with Textmate in Terminal. (mate: command not found)

I'm currently going through http://ruby.railstutorial.org/ and it uses the command "mate" to access Textmate through the terminal. I have had Textmate on my Macbook Air (Lion OS) since I first bought it, but when I try to use a command like "mate .gitignore" the terminal gives me "mate: command not found".
I've looked through all other StackOverflow questions regarding this topic and have done the following:
Attempted to create a symbolic link through the terminal with this code.
$ sudo ln -s /Applications/TextMate.app/Contents/SharedSupport/Support/bin/mate /usr/bin
This code lets me enter my password and tells me the file exists, but still does not allow me to use the "mate" command.
Accessed Textmate/Help/Terminal Usage and tried to create a link for /usr/bin only for it to say operation not permitted.
Used alias mate='open -a textmate'. This works; however, I have to do it every time I open Terminal.
So, my question is can anyone tell me what is wrong? Love to figure this out!
Thank you!
First, you should not add anything to /usr/bin. You should add it into /usr/local/bin. Further, getting the message "file already exists" from ln means that it did not create the link. Try this:
ln -s /Applications/TextMate.app/Contents/SharedSupport/Support/bin/mate /usr/local/bin/mate
Depending on your current setup, this may have to be run with sudo. In general, if you don't know whether to run something with sudo or not, try without first and see if you get a permissions error, then use sudo.
The best way to do it is from TextMate -> preferences -> Terminal and then check install
all the previous methods didn't work for me.

Trying to connect Terminal to recognize "mate" command for TextMate

Couldn't Create Link
Creating the link “/usr/bin/mate” failed with the following reason: Operation not permitted
I am getting this error when I attempt to link the terminal usage with TextMate.
I did this by going Help >> Terminal Usage...
And I tried to create a link in /usr/bin.
I think the problem is something to do with permission issue.
I am wondering if there is a way to work around this problem by changing bash file directly or something and make terminal recognize "mate" as a command.
Thank you for any suggestion.
Assuming Textmate is installed in /Applications the following command in the terminal should manually create the link for you:
$ sudo ln -s /Applications/TextMate.app/Contents/SharedSupport/Support/bin/mate /usr/bin
The command will ask you for your user account's password so it has the permissions necessary to create the link in /usr/bin/
There should be an option to create it in /usr/local/bin. Create it there. Make sure /usr/local/bin is in your $PATH.

Resources