Sponsored Content
Top Forums Shell Programming and Scripting Copy Specific Files Recursively Post 303010435 by apacheLinux on Sunday 31st of December 2017 06:21:15 AM
Old 12-31-2017
Copy Specific Files Recursively

Is it possible to only copy selected files+its directories when you are copying recursively?
Code:
find /OriginalFolder/* -type -d \{ -mtime 1 -o -mtime 2 \ } -exec cp -R {} /CopyTo/'hostname'__CopyTo/ \; -print

From the above line, I want to only copy *txt and *ini files from /OriginalFolder/*

Regards

Last edited by vbe; 12-31-2017 at 07:24 AM.. Reason: code tags please even for so lttle...
 

10 More Discussions You Might Find Interesting

1. Solaris

To copy the files newer than specific date

Dear all, Can you help me in copying files newer than speciifc date Thanks in advance, Rajesh (3 Replies)
Discussion started by: RAJESHKANNA
3 Replies

2. Shell Programming and Scripting

Recursively copy only specific files from a directory tree

Hi I am a shell-script newbie and am looking to synchronize certain files in two directory structures. Both these directory-trees are in CVS and so I dont want the CVS directory to be copied over. I want only .sh and .pl files in each subdirectory under these directory trees to be... (3 Replies)
Discussion started by: sharpsharkrocks
3 Replies

3. Shell Programming and Scripting

Copy only files recursively

Hi, find . | xargs -s 47518 can list all the files and directories recursively , is there any possibility to copy only files from directories and subdirectoreis once it is listed. Please help Thans & Regards Uma (3 Replies)
Discussion started by: umapearl
3 Replies

4. Shell Programming and Scripting

copy specific files and count them - not as easy as it seems!

Hi all: Here's my dilemma: to identify files of a specific type, copy them to a new location while preserving the original file attributes (date, time, full path, etc), and at the same time capture the count of the number of files identified as a variable for later reporting. Here's where I... (9 Replies)
Discussion started by: Yamaha Evans
9 Replies

5. Shell Programming and Scripting

Recursively move directories along with files/specific files

I would like to transfer all files ending with .log from /tmp and to /tmp/archive (using find ) The directory structure looks like :- /tmp a.log b.log c.log /abcd d.log e.log When I tried the following command , it movies all the log files... (8 Replies)
Discussion started by: frintocf
8 Replies

6. Shell Programming and Scripting

How to copy a directory without specific files?

Hi I need to copy a huge directory with thousands of files onto another directory but without *.WMV files (and without *.wmv - perhaps we need to use *.). Pls advise how can I do that. Thanks (17 Replies)
Discussion started by: reddyr
17 Replies

7. UNIX for Dummies Questions & Answers

Copy files recursively

Hello! I know what i s recursion, but can't imagine what shoudl be "recursicve copying" of files? Please, what should mean: cp -r /home/hope/files/* /home/hope/backup Can someone helpme with a simple example? Many thanks!!! (6 Replies)
Discussion started by: pinklemon
6 Replies

8. Shell Programming and Scripting

How to recursively copy directory only for recent files?

I love the -newerct flag for the Cygwin find command on windows. Can I use "/usr/bin/find . -newerct '3 hours ago'" to conditionally copy a directory tree so that only the files in the directory tree that are younger than 3 hours are copied to my destination directory such that the directory... (4 Replies)
Discussion started by: siegfried
4 Replies

9. Shell Programming and Scripting

Find Large Files Recursively From Specific Directory

Hi. I found many scripts in the web of achieving this. But I like to use this one find /EDWH-DMT03 -xdev -size +10000 -exec ls -la {} \;|sort -n -k 5 > LARGE.rst But the problem is, why it still list out files with 89 bytes as the output? Is there anything wrong with the command? My... (7 Replies)
Discussion started by: aimy
7 Replies

10. Shell Programming and Scripting

Copy files recursively to one single directory

I need to copy a complete directory structure into a new location. But I want to have all files copied into one directory and leave out the directory structure. So all files must be placed in one directory. (4 Replies)
Discussion started by: ReneVL
4 Replies
Gnome2::ThumbnailFactory(3pm)				User Contributed Perl Documentation			     Gnome2::ThumbnailFactory(3pm)

NAME
Gnome2::ThumbnailFactory - wrapper for GnomeThumbnailFactory HIERARCHY
Glib::Object +----Gnome2::ThumbnailFactory METHODS
thumbnailfactory = Gnome2::ThumbnailFactory->new ($size) o $size (Gnome2::ThumbnailSize) boolean = $factory->can_thumbnail ($uri, $mime_type, $mtime) o $uri (string) o $mime_type (string) o $mtime (a timestamp) $factory->create_failed_thumbnail ($uri, $mtime) o $uri (string) o $mtime (a timestamp) pixbuf = $factory->generate_thumbnail ($uri, $mime_type) o $uri (string) o $mime_type (string) boolean = $factory->has_valid_failed_thumbnail ($uri, $mtime) o $uri (string) o $mtime (a timestamp) string = $factory->lookup ($uri, $mtime) o $uri (string) o $mtime (a timestamp) $factory->save_thumbnail ($thumbnail, $uri, $original_mtime) o $thumbnail (Gtk2::Gdk::Pixbuf) o $uri (string) o $original_mtime (a timestamp) ENUMS AND FLAGS
enum Gnome2::ThumbnailSize o 'normal' / 'GNOME_THUMBNAIL_SIZE_NORMAL' o 'large' / 'GNOME_THUMBNAIL_SIZE_LARGE' SEE ALSO
Gnome2, Glib::Object COPYRIGHT
Copyright (C) 2003-2004 by the gtk2-perl team. This software is licensed under the LGPL. See Gnome2 for a full notice. perl v5.14.2 2011-11-16 Gnome2::ThumbnailFactory(3pm)
All times are GMT -4. The time now is 03:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy