Sponsored Content
Top Forums UNIX for Dummies Questions & Answers copy multiple files in different directories Post 302112064 by ennstate on Sunday 25th of March 2007 01:35:28 PM
Old 03-25-2007
Use cp -r

I think cp -r <from> <to> can be used in this case.

Thanks
Nagarajan Ganesan
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Copy single file to multiple directories

Please help - I need to copy a single file to multiple directories. Dir structure: Parent_Directoy Filename1 Child_Directory1 Child_Directory2 Child_Directory3 Child_Directory4 .... So I need to copy Filename1 to all of the... (2 Replies)
Discussion started by: kthatch
2 Replies

2. UNIX for Dummies Questions & Answers

Copy Directories excluding files

Hi guys, I want to copy folder and sub folders only. I don't want the files. If i use cp -r command it will copy entirely with files. Could any one suggest me. Thanks in advance (1 Reply)
Discussion started by: karthik82
1 Replies

3. UNIX for Dummies Questions & Answers

how can i copy those files into other directories have the same name

how can i copy those files into other directories have the same name but different in the end i have files in directory called test: 10_10_asdadfsdfad.txt 10_10_11_asdawqefwkjasd.txt 10_10_11_12_asdafjjhoqwd.txt i want to put them in exist directory thart i have on my system i have... (1 Reply)
Discussion started by: t17
1 Replies

4. Shell Programming and Scripting

Copy one folder to multiple directories

Hello, I have a small question and i hope someone can help me, if i have 200 domains directories in my server under this directory something like now how i can copy one folder i have to this directories? Thank You (5 Replies)
Discussion started by: GamGom
5 Replies

5. Shell Programming and Scripting

Copy files from multiple directories into one directory without overwriting them

I have several directories and all those directories have .dat files in them. I want to copy all those .dat files to one directory say "collected_directory" The problem is I don't want to overwrite files. So, if two file names match, I don't want the old file to be overwritten with a new one. ... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies

6. Shell Programming and Scripting

perform 3 awk commands to multiple files in multiple directories

Hi, I have a directory /home/datasets/ which contains a bunch (720) of subdirectories called hour_1/ hour_2/ etc..etc.. in each of these there is a single text file called (hour_1.txt in hour_1/ , hour_2.txt for hour_2/ etc..etc..) and i would like to do some text processing in them. Each of... (20 Replies)
Discussion started by: amarn
20 Replies

7. Shell Programming and Scripting

Copy files/directories excluding multiple paterns

my directory structure is like below: basedir\ p.txt q.htm r.java b\ abc.htm xyz.java c\ p.htm q.java rst.txt my requirement is i want to copy all the files and directories... (0 Replies)
Discussion started by: ajayyadavmca
0 Replies

8. UNIX for Dummies Questions & Answers

copy file using unix in multiple directories

Hi All Genious, I want to copy a file name XYZ .In a directory /HOME/dir/IXOS1/dir1 which contain multiple directories named not in pattern want to copy the XYZ in all of the directories available on path /HOME/dir/IXOS1/dir1 . Thanks in advance . (2 Replies)
Discussion started by: mumakhij
2 Replies

9. Shell Programming and Scripting

Copy files in respective directories

Hi Guys, I need to copy the files to respective directories based on name of the file. My script is something like below con=$1 for file in `cat $con` do file_tmp=$(ls -t1 $path| grep -i $file | head -n 1) echo $file_tmp if then cp $path$file_tmp $DIR/ap if then... (16 Replies)
Discussion started by: Master_Mind
16 Replies

10. UNIX for Beginners Questions & Answers

How to copy particular files from a multiple directories and paste in a new directory?

Dear all I have a multiple directories, say for example org1, org2, org3 ..... org100 and each directory having a file namely dnaG.fasta. I need to copy all the dnaG.fasta file from each directory and paste in another directory fastconcatg. Therefore, my script has to copy dnaG.fasta file from... (5 Replies)
Discussion started by: dineshkumarsrk
5 Replies
Crypt::GeneratePassword(3pm)				User Contributed Perl Documentation			      Crypt::GeneratePassword(3pm)

NAME
Crypt::GeneratePassword - generate secure random pronounceable passwords SYNOPSIS
use Crypt::GeneratePassword qw(word chars); $word = word($minlen,$maxlen); $word = chars($minlen,$maxlen); *Crypt::GeneratePassword::restrict = &my_restriction_filter; *Crypt::GeneratePassword::random_number = &my_random_number_generator; DESCRIPTION
Crypt::GeneratePassword generates random passwords that are (more or less) pronounceable. Unlike Crypt::RandPasswd, it doesn't use the FIPS-181 NIST standard, which is proven to be insecure. It does use a similar interface, so it should be a drop-in replacement in most cases. If you want to use passwords from a different language than english, you can use one of the packaged alternate unit tables or generate your own. See below for details. For details on why FIPS-181 is insecure and why the solution used in this module is reasonably secure, see "A New Attack on Random Pronounceable Password Generators" by Ravi Ganesan and Chris Davies, available online in may places - use your favourite search engine. This module improves on FIPS-181 using a true random selection with the word generator as mere filter. Other improvements are better pronounceability using third order approximation instead of second order and multi-language support. Drawback of this method is that it is usually slower. Then again, computer speed has improved a little since 1977. Functions chars $word = chars($minlen, $maxlen [, $set [, $characters, $maxcount ] ... ] ); Generatess a completely random word between $minlen and $maxlen in length. If $set is given, it must be an array ref of characters to use. You can restrict occurrence of some characters by providing ($characters, $maxcount) pairs, as many as you like. $characters must be a string consisting of those characters which may appear at most $maxcount times in the word. Note that the length is determined via relative probability, not uniformly. word $word = word($minlen, $maxlen [, $lang [, $signs [, $caps [, $minfreq, $avgfreq ] ] ] ); $word = word3($minlen, $maxlen [, $lang [, $signs [, $caps [, $minfreq, $avgfreq ] ] ] ); Generates a random pronounceable word. The length of the returned word will be between $minlen and $maxlen. If you supply a non-zero value for $numbers, up to that many numbers and special characters will occur in the password. If you specify a non-zero value for $caps, up to this many characters will be upper case. $lang is the language description to use, loaded via load_language or built-in. Built-in languages are: 'en' (english) and 'de' (german). Contributions welcome. The default language is 'en' but may be changed by calling load_language with a true value as third parameter. Pass undef as language to select the current default language. $minfreq and $minsum determine quality of the password: $minfreq and $avgfreq are the minimum frequency each quad/trigram must have and the average frequency that the quad/trigrams must have for a word to be selected. Both are values between 0.0 and 1.0, specifying the percentage of the maximum frequency. Higher values create less secure, better pronounceable passwords and are slower. Useful $minfreq values are usually between 0.001 and 0.0001, useful $avgfreq values are around 0.05 for trigrams (word3) and 0.001 for quadgrams (word). analyze $ratio = analyze($count,@word_params); $ratio = analyze3($count,@word_params); Returns a statistical(!) security ratio to measure password quality. $ratio is the ratio of passwords chosen among all possible ones, e.g. a ratio of 0.0149 means 1.49% of the theoretical password space was actually considered a pronounceable password. Since this analysis is only statistical, it proves absolutely nothing if you are deeply concerned about security - but in that case you should use chars(), not word() anyways. In reality, it says a lot about your chosen parameters if you use large values for $count. generate_language $language_description = generate_language($wordlist); Generates a language description which can be saved in a file and/or loaded with load_language. $wordlist can be a string containing whitespace separated words, an array ref containing one word per element or a file handle or name to read words from, one word per line7. Alternatively, you may pass an array directly, not as reference. A language description is about 1MB in size. If you generate a general-purpose language description for a language not yet built-in, feel free to contribute it for inclusion into this package. load_language load_language($language_description, $name [, $default]); Loads a language description which is then available in words(). $language_desription is a string returned by generate_language, $name is a name of your choice which is used to select this language as the fifth parameter of words(). You should use the well-known ISO two letter language codes if possible, for best interoperability. If you specify $default with a true value, this language will be made global default language. If you give undef as $language_description, only the default language will be changed. random_number $number = random_number($limit); Returns a random integer between 0 (inclusive) and $limit (exclusive). Change this to a function of your choice by doing something like this: { local $^W; # squelch sub redef warning. *Crypt::GeneratePassword::random_number = &my_rng; } The default implementation uses perl's rand(), which might not be appropriate for some sites. restrict $forbidden = restrict($word,$language); Filters undesirable words. Returns false if the $word is allowed in language $lang, false otherwise. Change this to a function of your choice by doing something like this: { local $^W; # squelch sub redef warning. *Crypt::GeneratePassword::restrict = &my_filter; } The default implementation scans for a few letter sequences that english or german people might find offending, mostly because of their sexual nature. You might want to hook up a regular password checker here, or a wordlist comparison. VERSION
This document describes version 0.03 AUTHOR
Copyright 2002 by Joerg Walter <jwalt@cpan.org>, inspired by ideas from Tom Van Vleck and Morris Gasser/FIPS-181. COPYRIGHT
This perl module is free software; it may be redistributed and/or modified under the same terms as Perl itself. SEE ALSO
Crypt::RandPasswd. perl v5.10.0 2003-09-09 Crypt::GeneratePassword(3pm)
All times are GMT -4. The time now is 03:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy