Please note for Oracle 11+, use the expdp and impdp utilities instead of exp and imp.

Here are some very useful commands for performing an export and then an import of your Oracle database using the oracle exp and imp commands.

This command can be run from the Oracle BIN folder.

Export the full database into a file as specified by the file parameter:
exp schema-user-name/password@databasename file=my-file.txt log=export.log full=y

Update May 2014:  If you are having issues where you see an error related to “Deferred Segment Creation” or you notice the empty tables that were exported are not being imported, you may need to pass an older version number in the parameters of the impdp command.  If things are working as expected, leave out the version number:

Import the data into a different machine or oracle instance:
imp schema-user-name/password@databasename file=my-file.txt log=import.log full=y version=11.1