Sponsored Content
Top Forums Shell Programming and Scripting Copy the files in directory and sub folders as it is to another directory. Post 302771877 by balajesuri on Thursday 21st of February 2013 11:33:07 PM
Old 02-22-2013
Like this? This one-liner will find all files recursively under folder1/ and copy them into folder2/ without creating sub-folders.
Code:
find ./folder1/ -type f -exec cp {} ./folder2/ \;

This User Gave Thanks to balajesuri For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Copy files from one directory to another

I need to copy about 13 Tb of data from one directory and subdirectories to the other (another mount point). If I run this as a cron, say between 10 pm and 7 am, not all of the files will be copied over. Is there a way of 'resuming' the copy the following evenings until all files are copied over? (0 Replies)
Discussion started by: hd2006
0 Replies

2. Shell Programming and Scripting

Copy files from one directory to another

Hi when copy the files from one directory to another as like below,it is tried to copy *. as a file. cp /home/rha/*. My objective is to copy all the files (don't care about case sensitive), Thanks in advance for your valuable reply. (1 Reply)
Discussion started by: HAA
1 Replies

3. UNIX for Advanced & Expert Users

mv OR cp many files from 1 big directory with sub folders all to 1 spot?

Hello All. I am trying to do this from a terminal prompt on my mac.... I have 100 folders all named different things. Those 100 folders are inside ~/Desktop/Pictures directory. Each of the 100 folders are uniquely named. The image files inside of each folder only have some similarities. ... (1 Reply)
Discussion started by: yoyoyo777
1 Replies

4. UNIX for Dummies Questions & Answers

How to copy all files into the same directory

Dear All, Again I have another simple question. :confused: I want to write a csh which can copy all files of a current directory with a new name in the same directory, I mean: If I have tree bird apple as files in a directory I want to give ,say number 007 as argument to my csh and it copies... (3 Replies)
Discussion started by: dreamer0085
3 Replies

5. UNIX for Dummies Questions & Answers

[SOLVED] Delete files and folders under given directory

I have a requirement to delete the files and folders under a given directory. my directory structure is like this.. Data | A(Directory) |_PDF(Directory)----pdf files |_XML()Directory --xml files |--files | B(Directory) |_PDF(Directory)----pdf files |_XML()Directory --xml files ... (1 Reply)
Discussion started by: ramse8pc
1 Replies

6. UNIX for Dummies Questions & Answers

Copy files into another directory

I have a folder will a lot of documents (pdf, xls, doc etc.) which users have uploaded but only 20% of them are currently linking from my html files. So my goal is to copy only the files which are linked in my html files from my Document directory into another directory. Eg: My documents exist... (5 Replies)
Discussion started by: ankitha
5 Replies

7. Shell Programming and Scripting

Find and copy these files to particular directory

RedHat Enterprise Linux 5.4 I have some files with the extension .cdp in several directories in various mountpoints(filesystems) . I would like to find and copy all these files into a single directory /u03/diagnore/data. How can I do this ? (3 Replies)
Discussion started by: kraljic
3 Replies

8. 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

9. Shell Programming and Scripting

How to delete all the files and folders inside all the directories except some specific directory?

hi, i have a requirement to delete all the files from all the directories except some specific directories like archive and log. for example: there are following directories such as A B C D Archive E Log F which contains some sub directories and files. The requirement is to delete all the... (7 Replies)
Discussion started by: Little
7 Replies

10. Shell Programming and Scripting

Cpio all *.txt-files out of folders to just one directory

I need a hint for reading manpage (I did rtfm really) of cpio to do this task as in the headline described. I want to put all files of a certain type, lets say all *.txt files or any other format. Spread in more than hundreds of subdirectories in one directory I would like to select them and just... (3 Replies)
Discussion started by: 1in10
3 Replies
XHFS(1) 						      General Commands Manual							   XHFS(1)

NAME
xhfs - graphical interface for manipulating HFS volumes SYNOPSIS
xhfs [left-path [right-path]] DESCRIPTION
xhfs presents a graphical front-end for browsing and copying files on HFS-formatted volumes. The display is divided into two parts, left and right, which can each independently view a directory on either an HFS volume or the host (UNIX) filesystem. Double-clicking the name of a directory in either view will open that directory. A pop-up menu at the top of each direc- tory view can be used to navigate to any directory between the current and the beginning of the hierarchy. Text files can be viewed by double-clicking them. Any file or set of files can be copied to the directory shown in the other view by selecting them and clicking the "Copy" button. Copying is performed according to the selected copy mode: MacBinary II The file(s) will be copied using the MacBinary II format. This is the recommended mode for transferring arbitrary Macintosh files. BinHex The file(s) will be copied using the BinHex format. This mode should be used to encode Macintosh files into strict ASCII format. Text In this mode, only the data fork(s) of the selected file(s) are copied. Furthermore, translation is performed on the data's end-of- line characters to conform to the standard for text files on the destination. Raw Data In this mode, only the data fork(s) of the selected file(s) are copied. However, no translation is performed whatsoever on the data. Automatic A copy mode will be selected automatically according to a set of heuristics. SEE ALSO
hfsutils(1), hfs(1) AUTHOR
Robert Leslie <rob@mars.org> HFSUTILS
02-Apr-1996 XHFS(1)
All times are GMT -4. The time now is 06:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy