How To Find A File Using SSH

To find a file on your server using SSH, simply use the “locate” command.

Example: locate fileyouwant.file

This will result in an output of all files on your server with that name

How To Copy File Form One Directory To Another Using SSH

Using SSH to copy a file from one directory to another is done simply with the following command:

cp file.name destination/directory/

How To Update To Latest Version of PHP

Many web applications, including Magento need PHP5.2 to function. If your server doesn’t have PHP 5.2, there’s a simple way to upgrade.

Using SSH, logon to your server.

Use these commands:

wget -q -O – http://www.atomicorp.com/installers/atomic.sh |sh

yum update php

/usr/local/psa/admin/sbin/websrvmng -a

/etc/init.d/httpd reload

That’s it!

How to Import Database Copy Into New Database Using SSH

Here’s the SSH command to import a database backup to a new database.

Navigate to the directory where your database copy resides using SSH.

mysql -uusername -p databasename < backupname.sql

You’ll be prompted for the password for the database. Enter that.

If this is a Magento database, it could take awhile to import. Ours is around 600M, so it took awhile.

That’s it.