Sponsored Content
Operating Systems Solaris how to get multiple files using sftp from a windows server Post 302265890 by TonyFullerMalv on Monday 8th of December 2008 05:25:11 PM
Old 12-08-2008
Type:
> prompt
to turn off do you want to yes/no? type questions.
Then type:
> mget <filenamepattern>
To get mutiple files, e.g.
> mget *.sh
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

SFTP from windows E:/ to unix server

Hello All :), I am making a script in the ksh to Secure FTP a set of files from the E:/ drive in windows a computer to a unix server. Had it been in the unix directory, I could have used the expect utility to use the non-interactive mode for sftp, #!/usr/local/bin/expect #!/bin/ksh ... (12 Replies)
Discussion started by: pranavagarwal
12 Replies

2. Shell Programming and Scripting

Error copying files from Unix (Solaris10) to Windows Server 2003 using scp/sftp

Hi, I have generated a Public/Private Key Pair in Solaris Unix (source) server and deployed the Public key in Windows 2003(target) server .ssh directory of user profile. When i try to connect(ssh, scp, sftp) from Unix, i'm getting below error message. Sun_SSH_1.1, SSH protocols 1.5/2.0,... (0 Replies)
Discussion started by: ajaykumarb
0 Replies

3. Shell Programming and Scripting

Unix shell script to Copy files from one Windows server to another Windows server.

Can anybody please help me on how to code for the below requirement: I need to write a shell script (on different unix server) to copy files from multiple folders (ex. BRN-000001) from one windows server (\\boldls-mwe-dev4)to a different windows server(\\rrwin-ewhd04.ecomad.int). This shell... (4 Replies)
Discussion started by: SravsJaya
4 Replies

4. Shell Programming and Scripting

Transfer files from linux server to windows using secure ftp (sftp)

HI, I have to transfer files from linux server to windows using secure ftp (sftp) .Kindly help me out. (3 Replies)
Discussion started by: manushi88
3 Replies

5. Shell Programming and Scripting

Sftp some files from windows server to UNIX server

hi i need to transfer some files from windows server to unix server using SFTP. but before transferring the files, i need to check the existence of a particular file in the remote directory (say r_dir1). if the file is present, then SFTP all the files. after SFTPing the files from the remote... (1 Reply)
Discussion started by: vinit raj
1 Replies

6. IP Networking

How to transfer files from UNIX server to windows machine or vice versa using ftp or sftp commands?

hi, i want to write a shell script code which transfers files from a directory in unix server to a directory in a windows machine.. can any1 give me a sample code which uses ftp or sftp command.. thanks very much, (3 Replies)
Discussion started by: Little
3 Replies

7. Shell Programming and Scripting

Needed SFTP script from windows to UNIX server and from UNIX to windows server(reverse SFTP)

hi guys, i need a script to sftp the file from windows to unix server ....(before that i have to check whether the file exists in the windows server or not and again i have to reverse sftp the files from unix to windows server..... regards, Vasa Saikumar. (13 Replies)
Discussion started by: hemanthsaikumar
13 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

List line count of multiple files in windows server 2012

how to find out line count ( wc -l ) for multiple fines in windows cmd the command which i a using to find line count for single file is type sec0001.txt | find /c /v "" but how to use it for multiple files to get output filewise as if this command is run like type sec*.txt |... (2 Replies)
Discussion started by: sagar_1986
2 Replies

10. Shell Programming and Scripting

Rename (move) multiple files on remote server using sftp

I want to rename (move) multiple files on remote server. I tried the following command to move all TXT files from my_dir directory to /new_dir. But it does not work. Any help? #!/bin/ksh sftp -dev3 << ABC cd my_dir $(for i in TXT; do echo "ls *.$i" ; rename $x /new_dir/$x;... (1 Reply)
Discussion started by: Soham
1 Replies
rcmgr(8)						      System Manager's Manual							  rcmgr(8)

NAME
rcmgr, rc.config - Gets, sets, or deletes runtime configuration variables stored in the files /etc/rc.config, /etc/rc.config.common, and /etc/rc.config.site SYNOPSIS
/usr/sbin/rcmgr [-c | -s] delete variable /usr/sbin/rcmgr [-c | -s] get variable [value] /usr/sbin/rcmgr [-c | -s] mget variable [value] /usr/sbin/rcmgr [-c | -s] set variable value /usr/sbin/rcmgr [-h | -n] [member_number] get variable [value] /usr/sbin/rcmgr [-h | -n] [member_number] mget variable [value] /usr/sbin/rcmgr [-h | -n] [member_number] set variable value /usr/sbin/rcmgr [-h | -n] [member_number] delete variable OPTIONS
The rcmgr command is used with at most one of the options -c, -s, -h, or -n. The options -c and -s are called file options and -h is called the host option. Operations are performed on /etc/rc.config.common, the clusterwide configuration file. Operations are performed on /etc/rc.config.site, the sitewide configuration file. Operations are performed on the /etc/rc.config file for the cluster member whose member ID corresponds to member_number. Operations are performed only on the node-specific file. DESCRIPTION
The rcmgr command retrieves, sets, or deletes runtime configuration variables stored in the hierarchy of configuration files: /etc/rc.con- fig, /etc/rc.config.common, and /etc/rc.config.site. These three files are together referred to as /etc/rc.config*. The runtime variables are used to configure various subsystems (for example, NFS or NTP) via scripts in the /sbin/init.d directory. Caution You should always use rcmgr to make changes to the files. This will preserve the correct syntax in the files. A lock file, /etc/rcmgr.lock prevents multiple access to the data files. These files are used as follows: On a standalone system, configuration variables in both /etc/rc.config and /etc/rc.config.common are used to configure the system. In a cluster, configuration variables defined in the /etc/rc.config.common file are shared by all cluster mem- bers. Because the /etc/rc.config file is defined as a context-dependent symbolic link (and must be maintained as such), there is a distinct /etc/rc.config file for each member in a cluster. The configuration variable settings in any given member's /etc/rc.config file apply only to that member. You can also create a sitewide configuration file named /etc/rc.config.site and distribute it among systems in a local area network or at a particular site. Note that Tru64 UNIX does not ship with such a file. If you decide to use a sitewide configuration file, you must create it, copy it to /etc/rc.config.site on each participating system, and edit each participating system's /etc/rc.config file to include the following command just before the similar line that executes # Read in the cluster sitewide attributes before overriding them # with the clusterwide and member-specific values. # . /etc/rc.config.site # The hierarchy of the /etc/rc.config* files allows an administrator to define configuration variables consistently over all nodes within a local area network and within a cluster. Variables that are the same for all machines on a LAN can be defined in a sitewide file. Variables that are not specific to a given machine and are (or could be) shared by all members of a cluster should be defined in the clusterwide file. Finally, variables specific to a given machine's hardware configuration should be defined in the machine-specific file (or each machine-specific file in a cluster). Command options either search the file hierarchy or operate directly on the the appropriate file as follows: ------------------------------------------------------------------ Option get mget set delete ------------------------------------------------------------------ -s direct direct direct direct -c direct direct direct direct -n direct direct direct direct -h hierarchy hierarchy direct direct Null (no option hierarchy hierarchy hierarchy direct specified) ------------------------------------------------------------------ For example, the -h and -n options do exactly the same thing for set and delete operations. For get and mget operations, the -n option operates only on the the rc.config file. Consider the following command: # rcmgr -h 2 get NUM_TCPD If the variable NUM_TCPD is not defined in the rc.config file, the rcmgr command searches the rc.config.common file next. If the value is found in the rc.config.common file, it is returned. If not, the rcmgr command searches the rc.config.site file. In contrast, you can specify the -n option as follows: # rcmgr -n 2 get NUM_TCPD In this case, if NUM_TCPD is not defined in the rc.config file, then no value is returned and no other files in the hierarchy are searched. The operations are defined in the following section. OPERATIONS
The get operation returns one of the following: the value of variable defined in one of the /etc/rc.config* files, value, or null. If the -coption is specified, the command looks only in the /etc/rc.config.common file. If the -s option is specified, the command looks only in the /etc/rc.config.site file. If the -h member_number option is specified, the command returns the value as defined for the cluster member whose member ID corresponds to member_number. If the -n member_number option is specified, the command looks only in the /etc/rc.config file. The get operation uses a standard search order: it first looks in /etc/rc.config; it then looks in /etc/rc.config.common; finally it looks in /etc/rc.config.site. If no file or host option is specified, the command finds the first definition of variable, using the standard search order. If the variable is not found in any of the files, the command returns value, if specified; otherwise it returns null. If the value of a variable is set to "" (null), then an rcmgr get operation on that variable will return an empty string. With no option specified, the mget operation returns all the variables defined in any of the /etc/rc.config* files, using the standard search order. If a variable is defined in more than one of the files, the first value encountered is returned. If -h member_number is specified, the operation functions identically, except it returns the values as defined for the cluster member whose member ID corresponds to member_number, using the standard search order. If the -n member_number option is specified, the command looks only in the /etc/rc.config file. The values are output one per line in the form variable=value. If no option is specified, the set operation uses the standard search order to set variable to value in the first /etc/rc.config* file in which it finds a definition of variable. If no definition is found, the set is done in the local /etc/rc.config file. If -c or -s is specified, the set is done in /etc/rc.config.common or /etc/rc.config.site, respectively. If -h member_number is specified, the set is done in the /etc/rc.config file for the cluster member whose member ID corresponds to member_number. If no option is specified, the delete operation removes variable from the /etc/rc.config file. The standard search order is not used. If -c or -s is specified, the delete is done in the /etc/rc.config.common or /etc/rc.config.site file, respectively. If -h member_num- ber or -n member_number is specified, the delete is done in the /etc/rc.config file for the cluster member whose member ID corre- sponds to member_number. ERRORS
If there is an error in an argument passed to rcmgr, or if a file option was specified but the file does not exist, rcmgr returns an error message and aborts execution with the exit value 1. EXAMPLES
This example sets the variable HOSTNAME to yukio in the /etc/rc.config file. rcmgr set HOSTNAME yukio This example sets the variable IFCONFIG_0 to 111.111.1.11 netmask 255.255.252.0 in the /etc/rc.config file. rcmgr set IFCONFIG_0 111.111.1.11 netmask 255.255.252.0 This example displays the value of the variable NIS_ARGS in the first definition of NIS_ARGS it finds using the standard search order. If no value is found in any of the /etc/rc.config* files, the command returns null. rcmgr get NIS_ARGS Startup scripts can use the get operation to provide values to variables as in the following examples. This example sets the value of net- devs to the value of MAX_NETDEVS in the /etc/rc.config file on node barney. If no value is defined, it sets netdevs to 24. netdevs=`rcmgr -h barney get MAX_NETDEVS 24` This example sets num_nfsd to 4 if NUM_NFSD is not defined in any of the /etc/rc.config* files. Otherwise, it sets num_nfsd to the value specified in the first definition of NUM_NFSD it finds using the standard search order. num_nfsd=`rcmgr get NUM_NFSD 4` This example deletes the definition of the variable NETDEV_1 from the clusterwide file /etc/rc.config.common. rcmgr -c delete NETDEV_1 FILES
Prevents applications from accessing the data files concurrently, which could cause data corruption. SEE ALSO
System Administration rcmgr(8)
All times are GMT -4. The time now is 12:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy