Logo Background RSS

» admin

  • ls: command options
    By on March 25th, 2009 | 15 Comments15 Comments Comments

    ls: command options

    Option Action

    -a                  list hidden files

    -d                  list the name of the current directory

    -F                  show directories with a trailing ‘/’
    executable files with a trailing ‘*’

    -g                  show group ownership of file in long listing

    -i                  print the inode number of each file

    -l                  long listing giving details about files
    and directories

    -R                  list all subdirectories encountered

    -t                  sort by time modified instead of name

  • Install mod_bandwidth
    By on March 23rd, 2009 | 9 Comments9 Comments Comments

    What is Mod_Bandwidth

    “Mod_bandwidth” (mod bandwidth) is a module for the Apache webserver that enable the setting of server-wide or per connection bandwidth limits, based on the directory, size of files and remote IP/domain.

    For Apache 1.3x. ONLY! This how-to is not compatible with old versions of apache, including but not limited to 1.3beta

    How to install mod_bandwidth

    1. Login to your server via SSH as root.

    2. Type: mkdir /root/mod_bw

    3. Type: cd /root/mod_bw

    4. Type: wget ftp://ftp.cohprog.com/pub/apache/module/1.3.0/mod_bandwidth.c

    5. Type: /usr/local/apache/bin/apxs -c /root/mod_bw/mod_bandwidth.c -o /usr/local/apache/libexec/mod_bandwidth.so

    6. Type: mkdir /usr/local/apache/bw_limit

    7. Type: mkdir /usr/local/apache/bw_limit/link

    8. Type: mkdir /usr/local/apache/bw_limit/master

    9. Type: pico -w /etc/httpd/conf/httpd.conf

    10. Locate the following Line: LoadModule rewrite_module libexec/mod_rewrite.so

    11. Before the above line add this:
    LoadModule bandwidth_module libexec/mod_bandwidth.so

    12. Now locate this line: AddModule mod_env.c

    13. Before the above line add this:
    AddModule mod_bandwidth.c

    14. Now locate this line: # Document types.

    15. Before the above line add this:
    BandWidthDataDir “/usr/local/apache/bw_limit”
    BandWidthModule On

    16. To enable mod_bandwidth on a virtual host locate the virtual host entry for the specified domain/acount you wish to limit. Just before the line add the following:
    BandWidthModule On
    BandWidth all 512

    The 512 can be replaced with whatever rate you wish to limit the acount too.

    17. Save the file and exit.
    CTRL-X then Y then enter.

    18. Type: service httpd restart

    19. Type: cd /usr/sbin

    20. Type: wget ftp://ftp.cohprog.com/pub/apache/module/cleanlink.pl

    What is cleanlink?
    Cleanlink is a deamon that is used to clean links created by mod_bandwidth when they aren’t removed properly by the server. (When a httpd process doesn’t terminate the usual way.)

    21. Type: chmod 755 cleanlink.pl

    22. Type: pico -w cleanlink.pl

    23. Change $LINKDIR to the following:
    $LINKDIR=”/usr/local/apache/bw_limit/link”;

    24. Save the file and exit.
    CTRL-X then Y then enter.

    25. Type: perl cleanlink.pl

    26. Type: pico -w /etc/rc.d/rc.local

    27. Scroll down to the very end of the file and add the following:
    # The following line Launches CleanLink for Mod_Bandwidth
    perl /usr/sbin/cleanlink.pl

    28. Save the file and exit.
    CTRL-X then Y then enter.

    mod_bandwidth has many options. If you wish to modify mod_bandwidth and enable more options please visit the documentation available by the programmer here: http://www.cohprog.com/v3/bandwidth/doc-en.html

  • Adding meta tags to blogger
    By on March 13th, 2009 | 3 Comments3 Comments Comments

    1.Sign in to your blogger dashboard>click the ‘layout’ button

    2.Click on the ‘Edit html’ tab

    Here is the code you have to add

    <meta content=’DESCRIPTION HERE’ name=’description’/>
    <meta content=’KEYWORDS HERE’ name=’keywords’/>
    <meta content=’AUTHOR NAME HERE’ name=’author’/>

    DESCRIPTION HERE:Write your blog description
    KEYWORDS:Write the keywords of your blog
    AUTHOR NAME:Write the author’s name(Your name)

    3.Add the above code just after this

    <b:include data=’blog’ name=’all-head-content’/>

    Don’t forget to add description and keywords.
    and save the changes.

    IMPORTANT:

    Several people were filling with just the keywords in the description.DON’T DO THAT.Google and other search engines will ban your site from the search engines list if you did so.And also,don’t repeat the keyword more than 3 times.

    That’s it!You have sucessfully added the metatags to your blogger(blogpsot) blog.If you want to check whether you added the meta tags correctly or not,just type ‘meta tags analyzer tool’ in the google and you will find so many sites which can check whether you have added the tags correctly or not.

  • Copying a Table
    By on March 4th, 2009 | 1 Comment1 Comment Comments

    /*create a copy of a table so that you
    can alter it or experiment with it without endangering the original
    data
    */

    CREATE TABLE new_table_name
    SELECT * FROM old_table_name;

    /* Differences: their names,
    if the old table had an index (or key), it
    does not transfer to the new table.
    only two columns chosen
    */

  • Get an email When Google Crawls Your Site
    By on February 25th, 2009 | 7 Comments7 Comments Comments

    Hi friends here is the php code to know whenever google crawl your website.
    it automatically sends you an email on your email id.

    < ?php
    if ( strpos( $_SERVER['HTTP_USER_AGENT'], ‘Googlebot’ ) !== false )
    {
    // Your email address
    $email_address = ‘you@yourdomain.com’;
    // Send yourself an email
    mail($email_address,’Googlebot Alert’, ‘The Googlebot has visited your page: ‘.$_SERVER['REQUEST_URI']);
    }
    ?>

    If you have any query feel free to contact me

  • Know other websites on same ip
    By on February 13th, 2009 | 1 Comment1 Comment Comments

    Hi friends enjoy reverse ip lookup
    Virtual Hosts and websites on a IP

    Here are some quick tips to know all the websites and Virtual Hosts on a IP address:

    1) Using whois DB
    syntax: http://whois.webhosting.info/x.x.x.x
    e.g.: http://whois.webhosting.info/64.233.169.99

    2) Using Domain Tools (sign-up required)
    syntax: http://www.domaintools.com/reverse-ip/?hostname=x.x.x.x
    e.g. http://www.domaintools.com/reverse-ip/?hostname=64.233.169.99

    Hope you all enjoy :D