Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Correcting a command (See related posts)

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=#

You need to create an account or log in to post comments to this site.


Click here to browse all 5140 code snippets

Related Posts