This is a discussion on Run mv command from ftp shell script within the Shell scripting forums, part of the Development/Scripting category; Hi all, I am taking log files every 15 min from remotemachine. My code is ; FRONTEND_HOME=/home/hai/jjsjs/Frontend_log cd /dsd/sds/sdsds/FrontEnd ftp ...
|
|||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
|||
|
Hi all,
I am taking log files every 15 min from remotemachine. My code is ; FRONTEND_HOME=/home/hai/jjsjs/Frontend_log cd /dsd/sds/sdsds/FrontEnd ftp -n 10.22.144.32 << END_INPUT >> /root/scripts/tracking/ftp_frontend.log 2>&1 user hai hai asc cd $FRONTEND_HOME prompt mget logger.log.* bye END_INPUT But i need to move the logfiles to other directory(from remotemachine) after my "mget" command .. i tried mv command but its not working ... Help will be highly appreciated.. Thanks Subin |
| Sponsored Links | ||
|
|
|
||||
|
Run mv command after END_INPUT
Code:
FRONTEND_HOME=/home/hai/jjsjs/Frontend_log cd /dsd/sds/sdsds/FrontEnd ftp -n 10.22.144.32 << END_INPUT >> /root/scripts/tracking/ftp_frontend.log 2>&1 user hai hai asc cd $FRONTEND_HOME prompt mget logger.log.* bye END_INPUT mv logger.log.* /some/where/else
__________________
Rocky Jr. You may have my body & soul, but you will never touch my pride! If you have knowledge, let others light their candles at it. Certified to work on HP-UX / Sun Solaris / RedHat |
|
||||
|
Have tried rename command. If rename is not suppored on remote ftp box try lftp client it has mv command built into it. ftp command client is not powerful enough to mv files.
__________________
Rocky Jr. You may have my body & soul, but you will never touch my pride! If you have knowledge, let others light their candles at it. Certified to work on HP-UX / Sun Solaris / RedHat |
|
|||
|
Hi Rocky,
Thanks alot for ur timely help... I tried lftp and mv is working for single files.. How can i move multiple files at a time ? I tried " mv logger.log.* arch/ " and it is giving error " no such file or directory error".... Thnks in advance Subin |
|
|||
|
Hi all,
I tried glob mv logger_cc.log.* arch/ command But it is not working for me... Can any one look into this ?? Thanks and regards Subin |
![]() |
| Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| shell script for ftp the file | vishal_titre | Shell scripting | 3 | 12-10-2007 08:40 AM |
| writing a shell script to find out my shell name | jaymob123 | Shell scripting | 1 | 10-08-2007 12:36 AM |
| running command a root in shell scripts | chiku | Shell scripting | 1 | 07-17-2006 06:39 PM |
| require shell script | puppen | Shell scripting | 4 | 04-12-2006 09:42 PM |
| Shell Script dought | Mahesh | Shell scripting | 3 | 02-16-2005 12:13 PM |