- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: find command
Operating System - Linux
1753903
Members
9617
Online
108810
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2004 07:20 PM
тАО07-26-2004 07:20 PM
find command
Can we find some files in a particual dir and copy them to some different folders using a single command (find)?
No limit to learning.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2004 07:30 PM
тАО07-26-2004 07:30 PM
Re: find command
Hi,
You can use -exec.
$ find . -exec cp {} /newdir/ ';'
Bojan
You can use -exec.
$ find . -exec cp {} /newdir/ ';'
Bojan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2004 07:32 PM
тАО07-26-2004 07:32 PM
Re: find command
Hi!
I think yes, you can use "-exec {}" in find command.
Something like:
find . -name mountain.jpg -exec cp '{}' / \;
PF
I think yes, you can use "-exec {}" in find command.
Something like:
find . -name mountain.jpg -exec cp '{}' / \;
PF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2004 07:33 PM
тАО07-26-2004 07:33 PM
Re: find command
What are your search criteria for files ? Are they in a single directory or sub-directory ? Do you want to copy directory structure or not ?
In case of all file in all sub-dirs copied in a single dir, it looks like that :
find /search/dir -name "foo*" -exec cp {} /to/dir \;
Regards,
Fred
In case of all file in all sub-dirs copied in a single dir, it looks like that :
find /search/dir -name "foo*" -exec cp {} /to/dir \;
Regards,
Fred
--
"Reality is just a point of view." (P. K. D.)
"Reality is just a point of view." (P. K. D.)
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP