Today (Saturday) We will make some minor tuning adjustments to MySQL.

You may experience 2 up to 10 seconds "glitch time" when we restart MySQL. We expect to make these adjustments around 1AM Eastern Daylight Saving Time (EDT) US.


Sftp multiple files in single command


 
Thread Tools Search this Thread
# 1  
Display Sftp multiple files in single command

Hi All,

I would like to sftp 2 files with a single command. I tried the below options,

Code:
sftp suer@test13:"/u01/home/oracle/SetDb.sh /u01/home/oracle/.profile" ./

But what actually happens is

Code:
Fetching /u01/home/oracle/SetDb.sh to /u01/home/oracle/.profile
/u01/home/oracle/SetDb.sh                                                                                                     100%   14KB  14.3KB/s   00:00
$

SetDb.sh file is overwritted as .profile.

I would like to transfer 2 files SetDb.sh & .profile

Kindly suggest.
# 2  
Can you use scp? This works with scp:
Code:
scp suer@test13:"/u01/home/oracle/SetDb.sh /u01/home/oracle/.profile" ./

# 3  
bartus11,

Thanks for your swift response.

scp command which you have mentioned works in other servers.

But in this server we dont have scp installed, any other options?
# 4  
You can try transferring it using SSH and cpio:
Code:
ssh suer@test13 'cd /u01/home/oracle/; find . -name SetDb.sh -o -name .profile | cpio -oc' | cpio -imu

 

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
Move multiple files to different directory using a single command
Soham
I have multiple files test1, test2, test3 etc. I want to move to a different directory with ABC_ prefixed to every file and and current dat time as postfix using a single command. (I will be using this is sftp with ! (command for local server). I have tried the following but it gives error ...... Shell Programming and Scripting
5
Shell Programming and Scripting
Single command to create multiple empty files(no trailing lines as well).
Onkar Banerjee
Hi, i need a single command to create multiple empty files(no trailing lines as well) and empty the files if already existing. please let me know or if this has been ansered, if some ocan share the link please, thanks > newfile.txt or :> newfile.txt do not work... Shell Programming and Scripting
4
Shell Programming and Scripting
Empty out multiple files with a single command?
Validatorian
I have a log directory: /logs/foo.log /logs/bar.log /logs/err.out I'm trying to find a way to > /logs/*.log > /logs/*.out to blank them out, but of course, that doesn't work. Any suggestions?... Shell Programming and Scripting
4
Shell Programming and Scripting
Grep multiple strings in multiple files using single command
gagan4599
Hi, I will use below command for grep single string ("osuser" is search string) ex: find . -type f | xarg grep -il osuser but i have one more string "v$session" here i want to grep in which file these two strings are present. any help is appreciated, Thanks in advance. Gagan... UNIX for Dummies Questions & Answers
2
UNIX for Dummies Questions & Answers
how to rename multiple files with a single command
tayyabq8
Hi I have following list of files at a path: 01.AR.asset 01.AR.index 01.AR.asset.vf 01.AR.asset.xv I want to rename all these files as follows: 73.AR.asset.Z 73.AR.index.Z 73.AR.asset.vf.Z 73.AR.asset.xv.Z Can any body give me a single command to acheive the above results. ...... Shell Programming and Scripting
5
Shell Programming and Scripting

Featured Tech Videos