Link to home
Start Free TrialLog in
Avatar of bemara57
bemara57

asked on

Trying to run a Linux/Unix bash command from the web, possible or need CGI?

I need to create a bash file with a few commands. What I'm trying to do is a web interface to copy a directory into another directory and vice versa (two hyperlinks).

One link I want it to do:
cp /var/www/test /var/www/backup/test022207
cp /var/www/live /var/www/test

The other link I want:
cp /var/www/live /var/www/backup/live022207
cp /var/www/test /var/www/live

Not sure if it's possible to run a bash command from the web or I have to use Perl/CGI to do it. Any idea how I would accomplish this?
ASKER CERTIFIED SOLUTION
Avatar of cwhicks
cwhicks

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ozo
CGI can talk to a bash script, or any other executable
you can also run scripts through telnet or ssh
By 'CGI' do you mean the procol that HTTP uses to comunicate with applications, or do you mean the Perl module that contains fuctions for using this protocol?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial