Login To InderWeb ! Just Play !

Username:
Password:

UserSubmittedComments

linux

running php file from linux shell vi editor and command line php for non http based files

for creating and executing a php file from ssh you need to PHP installed as binary (CGI) and add something like at top of shell script

[root:inderweb.com]!/usr/bin/php -q

.This is to tell the shell interprator(kernal) that we are using php from bin directory for executing lines of code in script.To get started with a simple php code in shell do following steps:-

  • Open shell prompt and go to your directory . e.g [root:inderweb.com ~]

what is shell script and how to use it? starting commands and scripts in linux

"Shell Script is series of linux command written in plain text file . Shell script is just like batch file is MS-DOS but have more power than the MS-DOS batch file e.g it can have the fully programming functionality in it."

Crontab Commands setup cron jobs in linux Edit your crontab file, or create one if it doesn't already exist.

In linux we can change cron tab file for setting and configuring cron jobs.We can use Vi editor for opening this file.
e.g crontab -e
Crontab Commands
__________

crontab -e     Edit your crontab file, or create one if it doesn't already exist.
crontab -l      Display your crontab file.

shell script variables linux bash shell using ssh from putty for commands

What Are Shell Script Variables?

A variable in a shellscript is a means of referencing a numeric or character value. And unlike formal programming languages, a shell script doesn't require you to declare a type for your variables.

installing ruby on linux server ruby-1.8.4.tar.gz root user

On linux server you may need to install ruby.you need to download ruby using wget command on linux. For doing this you need to have root access.

cd /usr/local/src
wget ftp.ruby-lang.org/pub/ruby/stable/ruby-1.8.4.tar.gz
tar xvzf ruby-1.8.4.tar.gz
cd ruby-1.8.4
./configure
make
make install
cd ..
wget http://rubyforge.org/frs/download.php/5207/rubygems-0.8.11.tgz
tar xvzf rubygems-0.8.11.tgz
cd rubygems-0.8.11
ruby setup.rb

linux mkdir command for creating directory with date which is helpful while cron scripts

mkdir `date +%b%y`
(creates a directory Jul02)
mkdir `date +%b%Y`
(creates a directory Jul2002)
mkdir `date +%m%y`
(creates a directory 0702)
mkdir `date +%m%Y`
(creates a directory 072002)

linux mkdir command for creating directory with date which is helpful while cron scripts

mkdir `date +%b%y`

(creates a directory Jul02)

mkdir `date +%b%Y`

(creates a directory Jul2002)

mkdir `date +%m%y`

(creates a directory 0702)

mkdir `date +%m%Y`

(creates a directory 072002)

mod_rewrite enabling url reqriting on apache and iss server windows and linux

URL reqriting is Simple Rewriting Your URLS (links) Also Redirecting Them To Known URLS.e.g you'll make the link : view_my_profile.html --> Is Redirected to function.php?op=3
so instead of the link "function.php?op=3" Which isn't enough
describing itself we'll make the link "view_my_profile.html" Which is
very describtive.Why using mod_reqrite?. Now see if your site has more than 10,000 Links (Dynamic Website) , do you think we would make 10,000 html files ??

Installing php4 and php5 on windows and linux and apache and iis server

How
to Install PHP 5.0 on Windows XP Pro


  1. Once you download the PHP
    zip file
    ( the Windows Binaries Zip Package),
    unzip it to c:\php.

    • To unzip using WinZip

Syndicate content

Popular Tags

tags in Web Links