![]() |
|
|
|
|
|||||||
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Telnet in batch file | aemunathan | UNIX for Dummies Questions & Answers | 1 | 05-09-2008 07:38 AM |
| rename the file in batch | reldb | UNIX for Advanced & Expert Users | 7 | 01-14-2008 02:43 PM |
| batch file | ramneek | High Level Programming | 3 | 11-09-2005 01:48 AM |
| batch file | ramneek | IP Networking | 1 | 11-08-2005 07:09 AM |
| Batch file update | cfoxwell | UNIX for Dummies Questions & Answers | 4 | 10-04-2001 01:50 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
I'm very new to unix and for the most part make my way around but I need to know how to create a batch file that can be ran at scheduled time. The main function of the file will be to copy files to different locations then FTP to a different server. Please help. I you have an example that would be great.
Thanks, Mike |
| Forum Sponsor | ||
|
|
|
|||
|
Batch files
Hi,
You can use crontab to schedule your batch file. Type "man crontab" for the manual. I can't help you with the batch file since my boss would kill me if I am not doing my work but yours I hoped this helped you at least to get started... |
|
|||
|
i use ncftp to do batchmod ftping. u get the idea.
Code:
if [[ `ls -l /homes/q162 | wc -l` -ge 2 ]] ; then
cd /homes/q162
for file in *;do
newname=`echo $file | sed 's/^....//'|awk -F"." '{ print $1 }'`
mv $file CLIENTCODE${newname}`date +%Y%m%d%H%M%S`.DAT
done
/usr/local/bin/ncftpput -f /homes/ncftp_scripts/q162_ncftp_out.conf -S .tmp -DD kfu /homes/q162/*
fi
|
|||
| Google UNIX.COM |
| Thread Tools | |
| Display Modes | |
|
|