The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 21, 2019, 02:12:11 AM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: ftp batch and linux  (Read 2429 times)
jammaster82
Lifer
*****
Offline Offline

Posts: 666


Thats craigs list for ya


View Profile
« on: January 16, 2008, 07:43:48 AM »

Can anyone from the linux crew
suggest a good way to maybe
ftp batch my local directory to
the webserver... perl script? 
Kylix app?  Kermit?  I see there
are many answers on google just wanted a
human opinion....
Logged

The watched pot, never boils... But if you walk away from it , the soup burns.  What gives?
vsloathe
vim ftw!
Global Moderator
Lifer
*****
Offline Offline

Posts: 1669



View Profile
« Reply #1 on: January 16, 2008, 09:18:44 AM »

Well I'd use PHP but that's just because I'm terribly unqualified to do any of the above mentioned. There are probably better options.
Logged

hai
jammaster82
Lifer
*****
Offline Offline

Posts: 666


Thats craigs list for ya


View Profile
« Reply #2 on: January 16, 2008, 01:49:06 PM »

after downloading a couple of non working
site editors , SCREEM, to be the suckiest,
i glanced across gftp and i
can bookmark the site , the directory
and upload and overwrite entire
folder after every edit with an alt-tab
and a single click, alt-tab again and the
browser page swings into view where i hit
refresh....php editing staion solved...

 simple ,sweet and phreE!
Logged

The watched pot, never boils... But if you walk away from it , the soup burns.  What gives?
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #3 on: January 16, 2008, 03:06:18 PM »

I tar.gz it all first, since it maintains permissions and the upload is a lot quicker. But PHP is a great way to go, people miss this all the time - if you simply:

#!/usr/local/bin/php
<?php

// some stuff

?>

then chmod to 755 you can execute a php file like any other batch script... so I've abandoned shell scripting almost entirely and gone with PHP - IME it's way better and damn easy. Since I don't have a worry about RAM (which would be the primary reason for shells rather than another PHP instance) it's a superior solution to my thinking. So if you wrote a little script that tar.gz'd everything in the current directory to, say, one directory up (towards the root) with a name specified on the command line you'd have a great solution. Then put the script in /usr/bin or something so that it's available from wherever you are. Then it'd be like this:

> dirupload.php targethost

... where dirupload.php is the script that does the compression and FTPing, and targethost is a filename that contains the ftp host, username, password etc of where you want it all to go.

Just thinkin...
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
jammaster82
Lifer
*****
Offline Offline

Posts: 666


Thats craigs list for ya


View Profile
« Reply #4 on: January 16, 2008, 03:32:05 PM »

sweet. i love it.

and i was running into the permissions
issue too...   Praise
Logged

The watched pot, never boils... But if you walk away from it , the soup burns.  What gives?
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!