Archive for January, 2009
This article will show you how to find the amount of RAM memory on a Linux machine. To find this information you will need to login to the Linux command-line shell and and enter the following command at the $ (or #) prompt: $ cat /proc/meminfo Sample Output MemTotal: 1031960 kB MemFree: 391172 kB Buffers: [...]
Click here to read the full post
January 29th, 2009 | Posted in Linux/Unix | 3 Comments
This article will show you how to find CPU (processor) type, speed, cache size, and much more under Linux. To find this information you will need to login to the Linux command-line shell and and enter the following command at the $ (or #) prompt: $ cat /proc/cpuinfo Sample Output processor : 0 vendor_id : [...]
Click here to read the full post
January 27th, 2009 | Posted in Linux/Unix | No Comments
This article will show you how to test AJAX web applications using Selenium. If you have used Selenium before, you are familiar with the wait_for_page_to_load (waitForPageToLoad) call which waits until a page finishes loading before continuing. If you have tried using this for an AJAX-enabled website, you will notice that your Selenium scripts just whizzes [...]
Click here to read the full post
January 26th, 2009 | Posted in QA - Web | No Comments
This article will explain how to use the tar command in Linux to create, list, and extract files. 1. Creating a .tar file To tar the contents of a single folder: tar -cvf filename.tar /folder1 To tar the contents of a multiple folders: tar -cvf filename.tar /folder1 /folder2 /folder3 To tar multiple files tar -cvf [...]
Click here to read the full post
January 26th, 2009 | Posted in Linux/Unix | No Comments
This article will show you how to find the number of files (including directories) within the current directory under Linux. Command ls -1 | wc -l Syntax Breakdown ls is the Linux command to list all files and folders in the current directory -1 will list each file on a separate line wc -l will [...]
Click here to read the full post
January 21st, 2009 | Posted in Linux/Unix | No Comments
This article will explain how to change the file extension for all files in a directory in Linux using a simple bash shell command. 1. Change from one extension to another The command below will rename all files with the extension .php4 to .php for f in *.php4; do mv $f `basename $f .php4`.php; done; [...]
Click here to read the full post
January 20th, 2009 | Posted in Linux/Unix | 2 Comments
As we all know, buying ink-jet cartridges at stores like Best Buy cost an arm and a leg. Often times, the price of a set of cartridges exceeds the cost of the printer! You might have searched online for alternative methods of buying replacements, but were overwhelmed buy the dozens and dozens of sites all [...]
Click here to read the full post
January 19th, 2009 | Posted in Deals & Bargains | 1 Comment
There are several ways to run a script or program at startup on a Linux machine, especially when taking into account the various run levels. This example is a quickstart method on how to run it at run level 3. Copy your script or file to /etc/init.d Create a symbolic link from this file to [...]
Click here to read the full post
January 8th, 2009 | Posted in Linux/Unix | No Comments
This article will show you a very simple way to find the size of a PostgreSQL database using a SQL SELECT statement. This will work on PostgreSQL version 8.3.3, but should work on older versions as well. Query SELECT pg_database.datname,pg_size_pretty(pg_database_size(pg_database.datname)) AS size FROM pg_database where datname=’database_name’; Sample Result datname | size —————–+——- database_name | 15 [...]
Click here to read the full post
January 7th, 2009 | Posted in Databases | No Comments
This article will explain how to mount an ISO image quickly and easily on Linux without downloading any additional software. If you are on a Windows operating system, check out the article: How to mount an ISO on Windows XP and Windows Vista Login as the root user (if you are not root, then switch [...]
Click here to read the full post
January 6th, 2009 | Posted in Linux/Unix | No Comments