Top 10 useful SSH terminal commands.

Now that you have a virtual server setup, you can enjoy the benefits of managing your server as root (super admin). With root level access, you can send commands to your server using a bash terminal. Here are the common commands:

  • man – stands for manual. Very useful command if you are just getting started with Linux. You can invoke ‘man’, followed by any other Linux command (cd, for example) and it will display detailed description and list of all available options.
  • cd – cd is short for ‘change directory’. Allows browsing between different folders of your VPS.
  • cp, mv, rm – great commands for basic file management. You can copy (cp), move (mv) or remove (rm) files/folders this way from your server.
  • grep – grep permits you to print lines that match a particular pattern. Useful if you are looking for a phrase or or line in a large text file (logs, for example).
  • ls – allows you to list the content of a directory. Using “ls -la” will also show you hidden files/directories (those starting with a dot) and additional attributes, such as permissions and ownership.
  • chown, chmod – every file or directory has its own ownerhip rights – user and group. With “chown” you can modify those parameters and “chmod” gives you the ability to change permissions (read, write, execute) for the owner, group and the rest of the users, accessing that file/directory.
  • nano, vi – “nano” and “vi” are probably the two most popular Linux text editors. You may find “nano” easier to use, while “vi” appears as the preferred editor among more experienced.
  • top, ps – “top” provides you with a periodic update (every five seconds by defaut) of running Linux tasks, while “ps” takes a snapshot of all current processes and prints it on your screen.
  • df -h, du -hs – shows you the current overall use of your disk in gygabytes (df -h).”du -hs” calculates the total size of a directory in a human readable format (e.g., 1K 234M 2G).

Here are a two bonus commands for checking DESK SPACE and RAM usages:

To check out the disk space usage on your server, execute this command:
df -h
And to see the memory usage:
free -m

Tagged : / / / / / / /

Mac Android Development – Publish to Device

Having problems getting your newly developed Android app to run on your device using a Mac? Well this is the missing puzzle that not many people know. You have to change your application setting in your Android phone first in order for your Android SKD to find the device USB location (if your on a PC, you’ll have to run a second USB support application). Here’s how: Continue reading “Mac Android Development – Publish to Device”

Setting up AOL Mail with your Entourage App

To my surprise, I was excited to find there is an easy way to setup my AOL mail using my favorite email application… Entourage!

Here’s how:

AOL’s new free AIM.COM accounts can also use IMAP and are configured identically – except, of course, for replacing ‘AOL.COM’ with ‘AIM.COM.’ Continue reading “Setting up AOL Mail with your Entourage App”

Tagged : / /

Continuous Connection Failed Error

On my iMac using Mac OS X (10.6.3), I kept getting this connection error:

There was an error connecting to the server “Server Name”. Check the server name or IP address, and then try again.

This started happening after opening a shared PDF file syncing comments form central server location. The problem is that I, not connected to my works server from home so It’s constantly fails to connect. Acrobat had something called Adobe Synchronizer running in my login items, and this seemed to continually try and reconnect to the shared drive. Once I removed that the problem went away. Continue reading “Continuous Connection Failed Error”

Tagged : /

Can’t delete file on external hard drive – Mac

I ran out of space on my external hard drive so I selected some folder file and pressed command-delete on my keyboard. They files looked as if though they were deleted but I notice the available space did not budge. I knew right than it was time to whip out the terminal to force the hard drive in to submission.

1) Type these command into Terminal window. MAKE SURE TO replace “disk” with the name of your external drive. If you have a problem creating a path to your external hard drive, type “cd” than a space and drag the icon of your hard drive to the terminal window. A path will be filled in automatically.

Code:

cd /Volumes/disk

2) Type out the remove command on then hidden trash directory.

Code:

sudo rm -rf .Trashes

3) It will ask you for your password. You will not see your password as you type for extra security. Once you are done,  press enter.

Code:

Password:

If you have a lot of files that needed deleting (ex: over 20GB) you may notice a dalyed response. If so, just keep an eye on the drive’s avalible memory and you will notice a gradual increase of space right before your vary eyes.

Tagged : / / / / /

How to backup MySQL Database via SSH

First you log in using your terminal application by typing the flowing SSH command:

ssh yourusername@hostname-or-ipaddress

After that, you will be prompted to enter your password. As you enter your password, the text will be hidden. Next we should switch to the “root” user. You can do so by typing the following in your terminal window:

su – root

You will have to enter a password once more. Now navagate to where you would like to store your MySQL database file. For an example of changing the directory to the “public_html” direcotry, type this:

cd /var/www/html_public

Now you can back up your db here using the following command. This command will backup all of your databases. I also chose to compress them after the pipe “|” as a gzip file. Type the following but be sure to change the user name and password to your info:

mysqldump -u yourusername -p yourpassword –all-databases | gzip >databasebackup.sql.gz

You can also target single database using the following:

mysqldump -u yourUserName -p yourDBName | gzip >databasebackup.sql.gz

Tagged : / / / /

Att.net Authentication failed in Entourage with POP & SMTP

After switching over from Comcast to ATT I received a free AT&T email account. I already owned a Yahoo POP email account that I setup with my Entourage email client. I tried to include the new ATT/Yahoo email account but I always received this error message:

Authentication failed because Entourage doesn’t support any of the available authentication methods.

I took some time surfing through Google results on the matter but I finally got it working using the following settings.

Setting up your client-based email account

  • Email address: MemberID@att.net
  • Incoming (POP): pop.att.yahoo.com
  • Outgoing (SMTP): smtp.att.yahoo.com
    1. Select SMTP server requires authentication
    2. Use same settings as receiving mail server

Advance Settings:

  • Incoming mail server: POP3
  • Incoming mail port number: 995  (make sure secure connection (SSL) is checked)
  • Outgoing mail port number: 465 (make sure secure connection (SSL) is checked)

IMPORTANT THING TO NOTE!
Do not check the box labeled “Override the default POP port”.
Some users didn’t have to check SSL for the Out going mail.

See screen grabs below:

1) Receiving Mail

Picture 3

2) Sending Mail

Picture 5