scp list of files


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting scp list of files
# 1  
Old 09-03-2008
scp list of files

Hi,

I have to get the list of files from my remote server to my local machine.

i tried using such as scp uname@server1:/path/to/dir file1 file2 ./

But i got only the file1 and its saying file2 not found eventhough its there in remote machine.

can anyone please help how to get the listed files using scp command.
# 2  
Old 09-03-2008
Try this:

Code:
$ scp uname@server1:/path/to/dir/file[1-2] .

Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Automate splitting of files , scp files as each split completes and combine files on target server

i use the split command to split a one terabyte backup file into 10 chunks of 100 GB each. The files are split one after the other. While the files is being split, I will like to scp the files one after the other as soon as the previous one completes, from server A to Server B. Then on server B ,... (2 Replies)
Discussion started by: malaika
2 Replies

2. Shell Programming and Scripting

scp files

Need assistance I have ssh keys exchanged between servers for user ZID ssh works without password between ZID . "ssh SERVER A to SERVER B works" I have a property file on SERVER A which is owned by root and I need to transfer the file changing into ZID user and transfer to SERVER B ... (7 Replies)
Discussion started by: ajayram_arya
7 Replies

3. UNIX for Dummies Questions & Answers

scp error while trying to copy files

Hi, I am trying to copy files from one server to other using the below code. scp -B -p user@remoteserver:/tmp/abc.txt /landing/files The above command is failing with error You're not allowed to run 'scp -p -f /tmp/abc.txt ' When I am using scp -B -p , why am I getting error msg as scp... (2 Replies)
Discussion started by: Nikhath
2 Replies

4. Shell Programming and Scripting

scp files from subdirectories only.

Hi there, Our current directory structure is set up as follows: -2013-09-20 - 380134664407418202 - 76523.html - 5331257754517660 - 76267.html - 76268.html - 76269.html - 76270.html - 76271.html - 76272.html - 76273.html - 76274.html -... (2 Replies)
Discussion started by: jimbojames
2 Replies

5. Shell Programming and Scripting

scp list of files using FOR LOOP in ksh

hi i want to scp files from remote server B to my local server A... and i have a file containing list of all files to be scped from remote server B there is a passwordless connectivity set between remote server and my local server. need a ksh script.. with a for loop that goes through... (2 Replies)
Discussion started by: billpeter3010
2 Replies

6. Shell Programming and Scripting

rm files after testing for successful scp

First off, I know this is sort of a rehash of similar questions that have been asked in other closed threads, but I haven't been able to figure out how to apply the answers provided in those threads to my scenario and make it work. I am working on a script in KSH on AIX 5.1 that will do a bulk... (1 Reply)
Discussion started by: derndingle
1 Replies

7. UNIX for Dummies Questions & Answers

scp multiple files

Hi, I'm new to Linux. I would like to know how to scp a group of files. I have the below command, but it asks for remote password while sending each file. Is there a way to send all files (identified by - $ ls | grep '.*hrs0314a.*' | xargs -I {} grep -l '.*35663.*' {}) in one go? $ ls |... (6 Replies)
Discussion started by: don_tom
6 Replies

8. Shell Programming and Scripting

SCP multiple files

Hi , I am doing SCP for copying log files from different server(around 24 server) I need to copy these bulk logfiles every 15 min. How can i do multiple SCP at the same time? My current code is like this scp $CUSTCARE_USER@$CUSTCARE_SERVER:$CUSTCARE_HOME/$CUSTCARE_LOG.*... (2 Replies)
Discussion started by: scorpio
2 Replies

9. UNIX for Dummies Questions & Answers

Arg List too Long in SCP

Hey guys. I have a program written in which i am trying to get the files from one remote machine and transferring the files to another remote machine using SCP. It works fine for 50 or 60 files but when the files grows to 250 then i get an error message stating "Arg list too long". #scp -p... (5 Replies)
Discussion started by: chris1234
5 Replies
Login or Register to Ask a Question