SCP directory help

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hi All-

Here is my problem.  I have a script that runs a few commands to send
out a file to a remote server daily.  It runs fine, except that when
the file is sent to the remote server, it tries to place the file into
a nested directory on the remoter server instead of where I want to
place the file.  for example:

i have file named test.txt in directory /home/mine/test.  I have a
script file that is run from cron that states:

zip /home/mine/test/test.txt
#Send via scp
/usr/local/bin/scp /home/mine/test/
#Remove old file
rm -fr /home/mine/test/test.txt
rm -fr /home/mine/test/

When the file is sent, it is creating a nested folder named
/home/mine/test.  Any ideas on how I stop this?


Re: SCP directory help

  Richard Silverman

Re: SCP directory help

Quoted text here. Click to load it

Perhaps you could use rsync? I've come to rather loathe some of the vagaries
of scp....

    rsync -e ssh /home/mine/test/

Site Timeline