Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Sftp multiple files in single command Post 302880226 by bartus11 on Wednesday 18th of December 2013 08:04:06 AM
Old 12-18-2013
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

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

sftp multiple files and subdirectories

Hi, I'm new to using the sftp command prompt within the unix shell (usually I just use an FTP windows program). I've successfully connected to a remote server from within ssh. I've also been able to copy multiple files using the mget command e.g. mget *.html How do I copy all files,... (3 Replies)
Discussion started by: robbieg
3 Replies

2. Shell Programming and Scripting

how to rename multiple files with a single command

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. ... (5 Replies)
Discussion started by: tayyabq8
5 Replies

3. UNIX for Dummies Questions & Answers

How to run multiple command in single command?

Dear Unix Guru, I have several directories as below /home/user/ dir1 dir2 dir3 Each directory has different size. I want to print each directory size (Solaris command du -hs .) Can you please guide me how to achieve this? Thanks Bala (2 Replies)
Discussion started by: baluchen
2 Replies

4. UNIX for Dummies Questions & Answers

Grep multiple strings in multiple files using single command

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 (2 Replies)
Discussion started by: gagan4599
2 Replies

5. Shell Programming and Scripting

help to upload multiple files through SFTP

Hi Experts, Please help me to write the expect script for uploading multiple files in one shot . Below is my program that I have written. #!/usr/local/bin/expect -f #/home/kulbhushan/sftp_prog.sh # procedure to attempt connecting; result 0 if OK, 1 otherwise proc connect {passw} { expect... (1 Reply)
Discussion started by: kulbhushan
1 Replies

6. Shell Programming and Scripting

Empty out multiple files with a single command?

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? (4 Replies)
Discussion started by: Validatorian
4 Replies

7. Shell Programming and Scripting

Single command to create multiple empty files(no trailing lines as well).

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 (4 Replies)
Discussion started by: Onkar Banerjee
4 Replies

8. Shell Programming and Scripting

Renaming multiple files in sftp server in a get files script

Hi, In sftp script to get files, I have to rename all the files which I am picking. Rename command does not work here. Is there any way to do this? I am using #!/bin/ksh For eg: sftp user@host <<EOF cd /path get *.txt rename *.txt *.txt.done ... (7 Replies)
Discussion started by: jhilmil
7 Replies

9. Shell Programming and Scripting

SFTP Multiple files

Hi :), I am new to Unix and Shell Script I have a urgent requirement, where i am new to shell script and Unix my requirement is I have a files in a folder like sales-prod-India-details.txt sales-prod-japan-details.txt sales-prod-china-details.txt My SFTP server has ... (3 Replies)
Discussion started by: spradeep86
3 Replies

10. Shell Programming and Scripting

Move multiple files to different directory using a single command

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 ... (5 Replies)
Discussion started by: Soham
5 Replies
cpio(5) 							File Formats Manual							   cpio(5)

Name
       cpio - format of cpio archive

Description
       The header structure, when the option of is not used, is:
       struct {
		  short   h_magic,
			  h_dev;
		  ushort  h_ino,
			  h_mode,
			  h_uid,
			  h_gid;
		  short   h_nlink,
			  h_rdev
			  h_mtime[2],
			  h_namesize,
			  h_filesize[2]'
		  char	  h_name[h_namesize rounded to word];
       } Hdr;
       When the option is used, the header information is described by:
       sscanf(Chdr,"%6o%6o%6o%6o%6o%6o%6o%6o%11lo%6o%11lo%s",
	     &Hdr.h_magic, &Hdr.h_dev, &Hdr.h_ino, &Hdr.h_mode,
	     &Hdr.h_uid, &Hdr.h_gid, &Hdr.h_nlink, &Hdr.h_rdev,
	     &Longtime, &Hdr.h_namesize,&Longfile,Hdr.h_name);
       The  Longtime  and  Longfile  are equivalent to Hdr.h_mtime and Hdr.h_filesize, respectively.  The contents of each file are recorded in an
       element of the array of varying length structures, archive, together with other items describing the file.  Every instance of h_magic  con-
       tains  the constant 070707 (octal).  The items h_dev through h_mtime have meanings explained in The length of the null-terminated path name
       h_name, including the null byte, is given by h_namesize.

       The last record of the archive always contains the name Special files, directories, and the trailer are recorded with h_filesize  equal	to
       zero.

See Also
       cpio(1), find(1), stat(2)

																	   cpio(5)
All times are GMT -4. The time now is 09:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy