PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > comp.unix.shell > FTP mv command
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.unix.shell Using and programming the Unix shell.

FTP mv command

Réponse
 
LinkBack Outils de la discussion
Vieux 03/05/2008, 00h33   #1
Fox
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut FTP mv command

I've small ftp script. it logins into remote FTP box and download
files using mget command.

I need to move the logfiles to other directoryfrom remote ftp as soon
as my "mget" command done. I've tried mv command using both ftp /
lftp but its not working. All i want is something as follows on remote
box
ftp> lcd /home/me/log/
ftp> mget *.log
ftp> mv *.log old/ <-------- this is not working

any is really appricated
  Réponse avec citation
Vieux 03/05/2008, 03h36   #2
h.stroph
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: FTP mv command

In news:7885cc08-7f8d-49ef-afa5-36512b3b1a8b@u12g2000prd.googlegroups.com,
Fox <fox@foxmail.in> typed:

> ftp> mv *.log old/ <-------- this is not working
>
> any is really appricated


To fully "appricate" any , you should invoke it by typing or ?
while connected to the ftp server to see the list of available commands. mv
is not one of them unfortunately, but you might be interested in rename.





  Réponse avec citation
Vieux 05/05/2008, 05h42   #3
Manie.Coetzee.NZ@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: FTP mv command

On May 3, 11:33am, Fox <f...@foxmail.in> wrote:
> I've small ftp script. it logins into remote FTP box and download
> files using mget command.
>
> I need to move the logfiles to other directoryfrom remote ftp as soon
> as my "mget" command done. I've tried mv command using both ftp /
> lftp but its not working. All i want is something as follows on remote
> box
> ftp> lcd /home/me/log/
> ftp> mget *.log
> ftp> mv *.log old/ <-------- this is not working
>
> any is really appricated


You can't move the file, but you can rename it. What I used to do is
to create a subdir, called retain, and then do a rename of each file
to it. You might find that you can't do a wildcard rename.

Try to use:
ftp> lcd /home/me/log/
ftp> get <FileName1>.log
ftp> rename <FileName1>.log old/<FileName1>.log <-------- old would
be your subdirs name.

Since you're using a script, and would suggest you use a proper
scripting language, like Perl (or whatever you know/like). The thing
is that you start out with a simple small script, but believe me it
will grow with time. Remember to clean up the old (retain) directory
occasionally.
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 14h13.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,11884 seconds with 11 queries