Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Correcting A Command

DZone's Guide to

Correcting A Command

·
Free Resource
If you've run a command that you discover needs a path, you can do something like this on the following line:

$ psql -U postgres mydb_here
bash: psql: command not found

$ /usr/local/pgsql/bin/!!
/usr/local/pgsql/bin/psql -U postgres mydb_here

Welcome to psql 7.3.5, the PostgreSQL interactive terminal.
mydb_here=#


Or if you mistyped the path:

$ /usr/loca/pgsql/bin/psql -U postgres mydb_here
-bash: /usr/loca/pgsql/bin/psql: No such file or directory

$ ^loca^local
usr/local/pgsql/bin/psql -U postgres mydb_here

Welcome to psql 7.3.5, the PostgreSQL interactive terminal.
mydb_here=#
Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}