I tried :
1) /usr/bin/sshpass: No such file or directory
2) I need to copy on one zip file like in this case /data/directory_to_sync/patch/file1.zip , I donot want to sync the complete directory .
Location: Asia Pacific, Cyberspace, in the Dark Dystopia
Posts: 19,118
Thanks Given: 2,351
Thanked 3,359 Times in 1,878 Posts
Yes, that is because you must set up all the right parameters.
You cannot just cut-and-paste my comment / example to you and expect it to work on your server with your userids, passwords, commands and paths.
You must install sshpass, set up your password, paths, etc. Do you not know that? You must read the messages (error messages) and configure your server youself.
I am surprised that you would not know this basic thing about working on a server.
You don't need to do the exact same command as me. I gave you only an example.
You need to learn what you are doing if you are going to be working on a server.
Location: Asia Pacific, Cyberspace, in the Dark Dystopia
Posts: 19,118
Thanks Given: 2,351
Thanked 3,359 Times in 1,878 Posts
There you go ... proving all things are possible if you apply your mind to the situation at hand.
In a parallel world there is a user on unix.com "Asad from India" who is using rsync .... and in another parallel universe the same user got angry and never logged in again.
I am working on a shell script where after making sftp connection to a remote server the file are being transferred. The problem is how to capture return code for the file which is missing at the remote location. I have tried to capture the return code which return value of "0" even the transfer of... (4 Replies)
Hi All,
I have a pretty demanding requirement for an SFTP script I have been trying to put together.
I have nearly 100 files (all with the names staring with T_PROD) generated in my local server daily. I need to transfer each of these files to a remote server via SFTP (that's a client... (6 Replies)
Hi
I have numerous files names
product_host_result_B1000842.txt
product_host_result_B1000847.txt
product_host_result_C1000842.txt
product_host_result_C1000848.txt
etc. I need them renamed so that the 'product_host_result' becomes 'output_product_host' but the rest of the filename is... (6 Replies)
Hi All,
I am calling a shell script from another shell script, however, it only executes part of it (the echo commands only). What could be some causes for that?
For example:
ShellScriptA.sh:
...
...
...
. ShellScriptB.sh
ShellScriptB.sh contents:
echo date
echo... (7 Replies)
I would like to create console application in c# to automate the process of downloading some files from a SFTP server to my local hard drive at a set time each week/day.
SFTP Server installed OpenSSH for windows and client machine also.
Any ideas how I could do such a task? or sample code.
... (0 Replies)
Hello i have 2 files:
a.out
10.1.1.1 james.franco
10.1.1.3 google.gol
10.1.1.14 yahoo.bol
b.out
10.1.1.1
10.1.1.3
10.1.1.45
I need to see an output just with:
10.1.1.1 james.franco
10.1.1.3 google.gol
Thankz in advance!! (2 Replies)
The clear command specifically says it can only clear the entire terminal display. There are no arguments. So I'm wondering if there are any work arounds.
Carriage return does not work for this as it only moves the cursor to the beginning of the line we're on. And obviously NL only goes down. If... (1 Reply)
Hi - I frequently run commands, and transfer files to/from a host that uses SecurID ssh authentication. It is a real pain to have to enter the authentication information every time I want to interact with this host. I am wondering if there is a way to establish a one-time ssh connection to this... (2 Replies)
I have variable $2 whose value is expdp_SDW_MSTR_VMDB.par
I want to replace three characters from right (par) with (log)
Input --> expdp_SDW_MSTR_VMDB.par
Output --> expdp_SDW_MSTR_VMDB.log
Thanks
Deep (2 Replies)
I need to read a file fron nth to n+m line by line using bash
ie
while read line
do
# soem stuff
done <<file
But The file is so big I am only intersted in reading ceratin portion of the file ie from nth line to mth line where m is alwasy greatr than n (2 Replies)