- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Script Query
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
тАО10-15-2009 08:09 AM
тАО10-15-2009 08:09 AM
I want to write a script that will move all files that are older than 3 days within a number of sub directories to another server location.
My thinking was that taking one dir at a time I will gather all files older than 3 days and put them into individual batch files i.e.
find . -type f -mtime +3 > batch.out
But how can I get the actual files listed in these batch files to copy onto another dir (even locally)? Anyone any ideas on the best way of doing this?
Regards,
D.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-15-2009 08:16 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-15-2009 08:18 AM
тАО10-15-2009 08:18 AM
Re: Script Query
scp -rp * remotehost:/copy_to_dir (* secure copy *)
find /dir -depth -name "back*" -type f -print | xargs tar -cvf back.tar
tar cf - /source_fs | remsh server "tar xvf -"
a) I use find . -depth -exec tar -cvf /tmp/file.tar {} \;
Then verify the contents with
tar -tvf /tmp/file.tar
Then ftp the tarball over and extract.
cd /dir/dir
tar -xvf file.tar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-15-2009 08:28 AM
тАО10-15-2009 08:28 AM
Re: Script Query
See:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1271016
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-16-2009 02:11 AM
тАО10-16-2009 02:11 AM
Re: Script Query
Regards,
Duffs