PSQL Select not working – or other simple commands not working
Working with command line postgres tool psql and having an issue?
Why doesn’t the psql command show the simple select query?
PSQL select not working is a problem that can happen in either of the following scenarios:
- Are you on the right database?
Chances are you might not be on the right database at all and the relation you are trying to find might not be there at all:Check if you are on the right database.
Run the command
\l to see the available databases.How to connect to the postgres database from the list?
Use the command
Let’s say the database name is inventory then:
\c inventory will connect you to the right database
Continue reading psql select not working
Working with something that needs a shell access, like working with awesome imagick function and stuck with sh: convert: command not found
The thing is it works when the same command that run from php script is run on the command line.
It is a path issue.
exec("convert soruce.ext converted.ext", $report);
Here the report would tell how it goes and it will get back with the news
sh: convert: command not found
To get the full path of the command and use it
exec("full-path-to-convert source.ext converted.ext", report);
The above would work for any command that creates related problems.
To stop the current process and get back to the shell:
To put the current process in the backgroup
To bring the background process to front
To send the the job to background on one line, put ambersand (&) at the end eg usingvi command:
vi somefile.txt &
To see all the background jobjs
Bringing specific job from background to foreground
fg %1 - this will bring the job number 1 to front
List all the running processes
To filter some process, like to get the process id and stuff
ps aux | grep "process name"