- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- find command
Categories
Company
Local Language
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
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
Community
Resources
Forums
Blogs
- 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:22 PM
тАО07-26-2004 07:22 PM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2004 07:32 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2004 07:46 PM
тАО07-26-2004 07:46 PM
Re: find command
-Ravi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2004 07:46 PM
тАО07-26-2004 07:46 PM
Re: find command
You can do by using find and cpio in one command.
to find a list of files after a certain period, you can make use of the -newer parameter. other wise you could use mtime and atime.
Eg:
find /path_name -name "*file_string*" -mtime +1 -print | cpio -p /new_loacation_path.
IA.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2004 07:52 PM
тАО07-26-2004 07:52 PM
Re: find command
#find / -type f -name "*string*" -exec cp -p {}
"-type f" optimizes the search, indicating that just looks for files (it omits directories, links, etc).
If you are ussing wilcards to find a file group you will contain it among " "
Rgds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2004 07:58 PM
тАО07-26-2004 07:58 PM
Re: find command
this can be done with teh -exec option of find. Something like
find . -type f -exec cp -p {} /yourdir \;
where {} ist the result of the find given to the copy command. And \; ends the copy command.
But in this case for every single file this will start a seperate cp process, copy the file and end the cp process.
This can be pretty slow if you have e.g. several thousand files to copy. If you have only a limited number of files to copy this is an easy way.
Hope this helps
Regards Stefan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2004 08:01 PM
тАО07-26-2004 08:01 PM
Re: find command
I would be much faster with my replies if there where no users (asking oh so important questions) around.
Regards Stefan