Tuesday, April 26, 2005

OK mode: stop + a to interupt from booting

Problem in startup hanging in network gateway...
Can not access virtual disk links sharing by other unbooting workstations

1. Stop + A

enter OK mode:

2.OK> boot -s

boot single mode

3. #vi /etc/vfstab

remark /pi or others like /octane/local/lfs1-4

4. start again

change back from /etc/vfstab

5. mount pi manually or restart

Monday, April 25, 2005

script to ftp files to Windows ftpd server

"ftp -n 10.1.0.24 quote user cacusr
quote pass fapassword
binary
lcd /pg/cact3index/INDEXES/
put `date '+cact3index_%b%d%Y.tar'`
dir
quit"

This blogger does not allow me to upload "#!".
Actually, try this in a script file:

" #!/bin/sh"
" ftp -n localhost "<""< !""
quote user YourUserName
quote pass YourPassword
binary
put file1 file2
quit
" !"


You should not have any problems with passing passwords...


Cheers!

http://www.experts-exchange.com/Programming/Programming_Platforms/Unix_Programming/Q_10292843.html

Sunday, April 24, 2005

delete file in windows system

http://www.petri.co.il/deldate.htm


DelDate
Description
This command deletes all files from the specified directory that were last modified prior to the number of dates specified. The utility is very useful when scheduled to delete old log files.

Important: No spaces are to be specified in the directory path. Use MS-DOS style short names.

Requirements: Windows NT4/2000/XP/2003

Download
Download deldate.zip (4kb)

You need to extract the tool/script found in the downloaded file by using WinZip or similar.

Syntax
DelDate

Example:

DelDate c:\logs 60

This sample would deletes all files in c:\logs that

Wednesday, April 06, 2005

auto delete old 30 days index.tar

Add a sh script which names as cleanpg.sh

in folder
/pg/cact3index/INDEXES

find /pg/cact3index/INDEXES/ -name '*.tar' -mtime +30 -type f -exec rm "{}" \;

( find in path 30days delete end)

Then change crontab to run it every Saturday morning 5:05 am

crontab -e

5 5 * * 6 /pg/cact3index/INDEXES/cleanpg.sh

crontab -l to display all job to be run