Ubuntu 11.04 “Natty Narwhal” pros and cons


A few days after the release of the Ubuntu 11.04, Linux enthusiasts are debating whether it’s worth it to upgrade to 11.04 or not. There are many advantages in upgrading your Ubuntu to Natty Narwhal, but some tend to stick to the old one.

Some loves it, some hates it. Some who upgraded their OS to 11.04 wants to revert it.

If you want to know more about the mixed reactions about Ubuntu 11.04, here’s a great read from Jun Auza of Tech Source from Bohol.

If you want to download the latest Ubuntu OS, click here!

Zip files via SSH and copy it to another folder or server

If you files and directories in your server via SSH, just type the command below:
zip -r zipfilename.zip folder

Just replace the folder with the folder name you are targetting or use * if your currently in the folder.

If you want to quickly zip all files and folders individually in your server via SSH, just type the command below:
find . -type f -exec zip '{}.zip' '{}' \;

Replace the dot after “find” to zip the specific folder and all files and folders inside it.

If you want to Tar.gz instead of .ZIP, you can use the command below:
tar -cvzf filename.tar.gz /home/path

Now, to copy the zip file or files in a folder to another folder, use the command below:
cp /home/user1/public_html/yourzipfile.zip*.* /home/user2/public_html

Just replace the user1 and user2 respectively. Or just specify which folder you want to copy your zip file.

If you want to copy all the files inside a folder and the files and folders inside the folder of a folder (sub folder, sub-sub folder, sub-sub-sub folder, and so on), then use the command below:
cp -r /home/user1/public_html/*.* /home/user2/public_html/

If you want to copy the files or folder to another server, use the command below:
scp -r /home/user/public_html/*.* user@serverip:/home/user/public_html/

Just replace the server IP with your IP or domain. You will enter a password after typing the command

Whitelist an IP address in your server via SSH

One day, one of my blog readers can’t access my site. I wondered why and how come she can’t access it but I can. I also asked other readers, and they can. If this happens to you, just like what happened to me, maybe that specific user was blacklisted by your host.

In order for him or her to access your site again, you need to whitelist his or her IP. So the first thing that you should do is ask his IP address, then whitelist it in your server. To white list an IP address, you need to type the following command via SSH:
csf -a IP /etc/init.d/csf restart

Just replace the IP with the actual IP address. For example you want to white list 1.1.1.1, just type the command
csf -a 1.1.1.1 /etc/init.d/csf restart

To see the white listed IPs you could use the command,
grep IP /etc/csf/csf.allow

I think this is not applicable to all server. I’m using CentOS 5.0 with suPHP as my PHP handler. If your server configuration is different, ask you host first if your not familiar with SSH commands.