Make a shell file
It's very easy to make a shell file on unix
1. vi or touch to create your file ( yourfile.sh)
Example FTP shell file
ftp -v -n your_ftp_site <<
user username password
bin
hash
lcd your part, that you want to transfer file (local)
mput your_file or * to transfer all file in part
bye
EOF
2. Edit and coding your file and save it.
3. chmod 7xx yourfile.sh
4. If your file on / when you run it use this format ./yourfile.sh
PS. If you use crontab to run script you must use full part
and don't forget to restart service
/etc/rc.d/init.d/crond restart
1. vi or touch to create your file ( yourfile.sh)
Example FTP shell file
ftp -v -n your_ftp_site <<
user username password
hash
lcd your part, that you want to transfer file (local)
mput your_file or * to transfer all file in part
bye
EOF
2. Edit and coding your file and save it.
3. chmod 7xx yourfile.sh
4. If your file on / when you run it use this format ./yourfile.sh
PS. If you use crontab to run script you must use full part
and don't forget to restart service
/etc/rc.d/init.d/crond restart
ความคิดเห็น