Sponsored Content
Top Forums UNIX for Dummies Questions & Answers copy files with directory structure Post 302099294 by anbu23 on Monday 11th of December 2006 07:50:36 AM
Old 12-11-2006
I didn't read your requirement properly.

Code:
while read pth
do
    dr=`dirname $pth`
    if [ -d "homedir/$dr" ]
    then
       mkdir -p "homedir/$dr"
    fi
    cp $pth "homedir/$dr"
done < aadd.sh

 

9 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. Shell Programming and Scripting

disk space used for files with in a directory structure.

Hello, I am new to shell scripting and would really appreciate if someone could help me with this question. I have a directory structure as follows.. main directory is DATA under which i have different directories names fileserver01, fileserver02 ... till fileserver 15. under each... (8 Replies)
Discussion started by: kasala
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. 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

5. SCO

Transfer files wih directory structure.

I need to transfer software off a SCO OpenServer 5.0.5 server. I can not seem to read this server's tape on my other server since the tape drive (IBM Gen 5 DAT 72GB) will continuosly "eject" this DAT 8 tape. I have been able to 'tarball' most of the smaller directories with success and... (11 Replies)
Discussion started by: uxlunatick
11 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 files from input file with dir structure

hi, I want to copy files from source directory based on input file (or output of previous command) and i want to have the SAME DIRECTORY STRUCTURE. Note that i will have other files and directories which i dont want to copy to destination. For example, dir source has following content:... (22 Replies)
Discussion started by: dragon.1431
22 Replies

8. Shell Programming and Scripting

Need to copy a directory structure from one server to another

Hello All, I have got a dev server and a production server will call it as D server and P server. I have a dir structure in my D server and i need to create the same dir structure in P server also using a shell script. If i do a find . in my D server, i am getting an o/p like :- . ./vio... (9 Replies)
Discussion started by: Renjesh
9 Replies

9. Shell Programming and Scripting

Archiving files keeping the same structure directory

Hello Team, We would like to backup a lot of files inside of a structure of directories, four, five or more levels in some Ubuntu, Mac and Solaris systems. For instance: /home/chuck/sales/virgin/rent-quote.pdf /home/chuck/sales/marriott/vacation-quote.pdf... (2 Replies)
Discussion started by: csierra
2 Replies
PYZORD(1)						      General Commands Manual							 PYZORD(1)

NAME
pyzord - spam-catching server SYNOPSIS
pyzord [-d] [--homedir dir] Note: pyzord does not daemonize itself. Note: logging information is written to standard output. OPTIONS
-d Turn on debugging --homedir dir use dir as the home directory for Pyzor instead of the default ~/.pyzor. See the files section for more information on what files are inside of the homedir. FILES
~/.pyzor/config The format of this file is INI-style (name=value, divided into [sections]). Names are case insensitive. All values which are filenames can have shell-style tildes (~) in them. All values which are relative filenames are interpreted to be relative to the Pyzor homedir. Defaults [server] Port = 24441 ListenAddress = 0.0.0.0 DigestDB = pyzord.db PasswdFile = pyzord.passwd AccessFile = pyzord.access SEE ALSO
pyzor(1) AUTHOR
This manpage was originally written by Bastian Kleineidam <calvin@debian.org> for the Debian distribution of pyzor but may be used by oth- ers. The main author of pyzor is Frank J. Tobin <ftobin@neverending.org>. The main project page for pyzor can be found at http://source- forge.net/projects/pyzor 10 Oct 2002 PYZORD(1)
All times are GMT -4. The time now is 11:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy