Navigating in UNIX

1 Jun 2008 In: SSH

Navigating in UNIX

pwd Shows the full path of the current directory
ls Lists all the files in the current directory
ls -al Lists all files and information
ls –alr Lists all files and information in all sub-directories
ls -alr | more Same as ls –alr, pausing when screen becomes full
ls -alr > filename.txt Same as ls –alr, outputs the results to a file
ls -al /home/usr/bob/ Lists files and information for /home/usr/bob
ls *.html Lists all files ending with .html
cd [directory name] Changes to a new directory
cd .. Changes to directory above current one

source: http://www.atlantavirtual.com/support/sup-doc/ssh.shtml

Getting started with SSH

1 Jun 2008 In: SSH

Using SSH with UNIX

Using UNIX

The following is a list of UNIX commands that we found to be helpful when modifying web sites on the server. Most UNIX commands have many options and parameters which are not listed here. For more complete information on using UNIX commands, you can refer to the online manual by typing man [command] at the UNIX prompt, where "[command]" represents the command you would like more information about. Other UNIX help commands you can type are [command] -? and [command] --help.

Note: When something is specified in brackets, such as [command] or [filename], it is used to indicate that you must input your desired information here. Do NOT include brackets in your command.

Note 2 : Only use lower-case letters. UNIX is case sensitive.

source: http://www.atlantavirtual.com/support/sup-doc/ssh.shtml

What is SSH?

1 Jun 2008 In: SSH


What is Secure Shell and how do I use it?

Overview of SSH

When you SSH to your domain, you are controlling it using the operating system of the server. Any commands you enter are run on the server (not your local PC) and operate according to the command parameters on the server.

Secure Shell (SSH) provides a command line interface that lets you run commands to modify the contents of your web site. It encrypts all the data sent and received, providing a high level of security.

http://www.atlantavirtual.com/support/sup-doc/ssh.shtml

eregi

28 May 2008 In: Regular Expression

eregi — Case insensitive regular expression match
<?php
$string 
'XYZ'
;
if (
eregi('z'$string
)) {
    echo 
"'$string' contains a 'z' or 'Z'!"
;
}
?>

eregi_replace — Replace regular expression case insensitive
string eregi_replace ( string $pattern , string $replacement , string $string )

preg_replace

28 May 2008 In: Regular Expression

Perform a regular expression search and replace

Example #1 Using backreferences followed by numeric literals

<?php
$string
= 'The quick brown fox jumped over the lazy dog.';
$patterns[0] = '/quick/';
$patterns[1] = '/brown/';
$patterns[2] = '/fox/';
$replacements[2] = 'bear';
$replacements[1] = 'black';
$replacements[0] = 'slow';
echo
preg_replace($patterns, $replacements, $string);
?>

The above example will output:

The bear black slow jumped over the lazy dog.

By ksorting patterns and replacements, we should get what we wanted.

<?php
ksort
($patterns);
ksort($replacements);
echo
preg_replace($patterns, $replacements, $string);
?>

The above example will output:

The slow black bear jumped over the lazy dog.
<?php
$string
= 'April 15, 2003';
$pattern = '/(\w+) (\d+), (\d+)/i';
$replacement = '${1}1,$3';
echo
preg_replace($pattern, $replacement, $string);
?>

The above example will output:

April1,2003

Read the rest of this entry »

About

Web Siteblob is a collection of useful web development dictionary for web developers (beginner). Visitors can find information related to php, mysql, javascript, and some server configuration here.

We wish you can join as our member and start sharing your tricks with everyone.

As some of the information here is from other sites, credits will be given to these site by stating the source and adding the sites in our friend's link.

Thank you!


Sponsors