Sponsored Content
Top Forums Shell Programming and Scripting Need to copy a directory structure from one server to another Post 302502448 by Dahu on Tuesday 8th of March 2011 03:08:16 AM
Old 03-08-2011
Quote:
Originally Posted by Renjesh
So I need to create files and directories (with same content)as we can see in D server to P server.
The tar command is your friend. No need to elaborate a bunch of scripts for this task.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

any idea to copy directory structure

I want to copy the durectory structure having subdirectories in it ... would be greatful if anyone could let me know .. thanks in advance (6 Replies)
Discussion started by: myelvis
6 Replies

2. UNIX for Dummies Questions & Answers

Copying a Directory Structure to a new structure

Hi all Is it possible to copy a structure of a directory only. e.g. I have a file with the following entries that is a result of a find :- /dir1/dir2/file.dbf /dir1/dir2/dir3/file1.dbf /dir1/file.dbf I want to copy these to a directory and keep the structure however starting at a new dir... (8 Replies)
Discussion started by: jhansrod
8 Replies

3. UNIX for Advanced & Expert Users

MV files from one directory structure(multiple level) to other directory structure

Hi, I am trying to write a script that will move all the files from source directory structure(multiple levels might exist) to destination directory structure. If a sub folder is source doesnot exist in destination then I have to skip and goto next level. I also need to delete the files in... (4 Replies)
Discussion started by: srmadab
4 Replies

4. UNIX for Dummies Questions & Answers

copy files with directory structure

i have a text file as. /database/sp/NTR_Update_Imsi_List.sql /database/sp/NTR_Update_Imsi_Range_List.sql /database/sp/NTR_Vlr_Upload.sql /database/tables/StatsTables.sql /mib/ntr.mib /mib/ntr.v2.mib /scripts/operations/ntr/IMSITracer.ph /scripts/operations/ntr/IMSITracer.pl ... (3 Replies)
Discussion started by: adddy
3 Replies

5. Shell Programming and Scripting

Recursion to Copy a Directory structure

I have the below code to recurse through a given file path. I am able to go to the leaf level once recursively but traversing out is not possible as the required varaibles don't have the values on return. Both typeset and local don't work for my variable definitions. I have the o/p of the sample... (2 Replies)
Discussion started by: avrkiran
2 Replies

6. Shell Programming and Scripting

copy directory structure to a system on the network

I am trying to write a script which has to copy the directory structure from my system to another system on the network. But I dont want the files to be copied. I think I have to start with copying all subdirectories names in a directory to a system on the network. Here's the case: Source... (1 Reply)
Discussion started by: firefox211
1 Replies

7. Shell Programming and Scripting

copy the latest file in the remote server's directory

Hi Expert Team, I performed the below piece of code to copy the latest file in the remote server's directory to the same server's other directory. But it is not working properly. How can i handle this? Can you please help me..? ssh ${REMOTE_USERID}@${REMOTE_HOSTNAME} "cp -p `ssh... (3 Replies)
Discussion started by: spkandy
3 Replies

8. UNIX for Dummies Questions & Answers

Linux Server Network Settings - Share Directory Structure

Hello Unix Gurus Who I Hope Reads This, I have quasi-inherited control over a Linux cluster at a university research lab. The post-doc that set it up is gone, and the person in charge of administering the cluster doesn't know a ton about Linux. Amongst other things, I want to use the cluster... (0 Replies)
Discussion started by: mbl
0 Replies

9. Shell Programming and Scripting

Copy a directory from a server (UNIX) to a PC (Windows)

Hello, I already do some question about this topic. I already establish the conection from the server (Centus) whit the windows PC using SSH. Now I have two problems: 1- The server always ask me about a password to copy the files to the windows pc, I don't know how to avoid this, if someone can... (2 Replies)
Discussion started by: yeestrada
2 Replies

10. Shell Programming and Scripting

Copy Directory Tree from one Server to Another

Hi, I have a serverA with Directory "/opt/app/myfiles" which is 8.5GB with more than 40000 files and 45 folders in it. I wish to transfer the folder "/opt/app/myfiles" tree structure with all the sub-directories and skip all files to another serverB. I would appreciate a command that... (4 Replies)
Discussion started by: mohtashims
4 Replies
KUP(1)								    kernel.org								    KUP(1)

NAME
kup - kernel.org upload utility SYNOPSIS
kup [global options] command [-- command...] DESCRIPTION
This utility is used to upload files to kernel.org and other systems using the same upload system (kup-server). Each upload is required to have a PGP signature, and the server will generate multiple compressed formats if the content uploaded is intended to be compressed. Additionally, if the user has content from a git(1) tree already on server, it is possible to reproduce the content server-side and there- fore reducing bandwidth needs. The user still has to generate the content locally and sign it. GLOBAL OPTIONS
-b, --batch Instead of connecting to a remote host, output the protocol content to standard output. The output from an arbitrary number of kup invocation can be concatenated and then sent to the server as a single session. -e, --rsh, --ssh command Override the default command used to connect to the server. The default is set by the environment variable KUP_RSH or if that is not set, ssh -a -x -k -T. -H, --host [user@]host Override the default user and host to which to connect. The default is set by the environment variable KUP_HOST or if that is not set, kup.kernel.org. COMMANDS
A series of commands can be specified on a single command line, separated by a double dash argument (--). In all cases, PGP signatures are detached signature files corresponding to the uncompressed content. If a remote_path ends in .gz then gzip, bzip2 and xz compressed files are generated on the server; otherwise the content is stored uncompressed. put local_file signature_file remote_path Upload the file local_file with signed with signature_file. local_file can be compressed with gzip, bzip2 or xz; this may reduce upload time. The content will be stored compressed or uncompressed depending solely on the extension of remote_path. put --tar remote_tree ref signature_file remote_path Generate a tar archive file from ref ref of git tree remote_tree (using git archive --format=tar) with signature signature_file gen- erated locally, and place it in remote_path. git archive has been found to be relatively stable, and so this command is relatively robust to git version changes. put --diff remote_tree ref1 ref2 signature_file remote_path Generate a patch file between refs ref1 and ref2 of git tree remote_tree (using git diff-tree -p) with signature signature_file gen- erated locally, and place it in remote_path. The output of git diff-tree has been found to vary between git versions, and so successful use of this command may require the same version of git locally as on the server in order to produce a valid signature. mkdir remote_path Create a new directory on the server. mv|move old_path new_path Move the file or directory old_path to new_path. For a file, the .sign files are also moved, and for compressed files, all the com- pression formats are moved together. ln|link old_path new_path Hard link the file or directory old_path to new_path. For a file, the .sign files are also linked, and for compressed files, all the compression formats are linked together. rm|del|delete old_path Delete the file or directory old_path. For a file, the .sign files are also deleted, and for compressed files, all the compression formats are deleted together. ls|dir path... Lists back the contents of one or more directories on the server. PATHNAME HANDLING
Remote (server) pathnames all need to be absolute paths, starting with a slash (/). The sole exception is new_path for the mv and link commands, which if it is not absolute is taken to be relative to the old_path minus the final component. Similarly, if new_path ends in a slash then the final component of old_path will be appended. For the put command, except when --tar or --diff is specified, if the remote_path ends in a slash then the final (filename) component of local_file will be appended to the final pathname. CONFIG FILE
Kup checks the presence of $HOME/.kuprc and can load the host and rsh parameters from the config file. Environment variables KUP_HOST and KUP_RSH will override the values set in this config file. SAMPLE $HOME/.kuprc: host = user@kup.kernel.org rsh = /usr/bin/ssh -a -x -k -T AUTHOR
Written by H. Peter Anvin <hpa@zytor.com>. COPYRIGHT
Copyright (C) 2011 Intel Corporation This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, Inc.; either version 2 of the License, or (at your option) any later version; incorporated herein by refer- ence. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. SEE ALSO
git(1), ssh(1), gzip(1), bzip2(1), xz(1). kernel.org upload utility 2011 KUP(1)
All times are GMT -4. The time now is 10:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy