Thursday, June 7, 2007

Setting up scripts in Linux

Setting up scripts

1) ssh w/private&public keys, no passords
2) rsync -ave ssh @remotebox:/full/path/ /full/local/path/
3) Create your script and make it executable (usually chmod 755 .sh)
If bash script - start it with #!/bin/sh
example:
#!/bin/sh
rsync -ave ssh @remotebox:/full/path/ /full/local/path/
/path/to/perl -w perl_file_name /path/to/
any_other_processes

4) If script is OK - put it in /etc/chron. -rather create symbolic links to your scripts dir (ln-s)

Notes:
#slocate -u
then
$locate | grep

or

$sudo find /-name -print

No comments: