- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: need help with shell script
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
Forums
Discussions
Discussions
Discussions
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
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
03-07-2007 01:52 AM
03-07-2007 01:52 AM
need help with shell script
#!/bin/sh
ls -altr /var/.audit >> /tmp/AuditMove.txt
find /var/.audit/*.* -mtime +5 -exec mv {} \;
exit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2007 01:56 AM
03-07-2007 01:56 AM
Re: need help with shell script
regards,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2007 01:58 AM
03-07-2007 01:58 AM
Re: need help with shell script
does your mv fail ?
You have not defined where you want to move the files to !
You need something like:
# find /var/.audit/*.* -mtime +5 -exec mv {} /tmp/ \;
Please also read:
http://forums1.itrc.hp.com/service/forums/helptips.do?#33 on how to reward any useful answers given to your questions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2007 01:59 AM
03-07-2007 01:59 AM
Re: need help with shell script
# find /path -xdev -type f -mtime +5 | xargs -i mv {} /newpath
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2007 02:19 AM
03-07-2007 02:19 AM
Re: need help with shell script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2007 02:21 AM
03-07-2007 02:21 AM
Re: need help with shell script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2007 11:00 PM
03-07-2007 11:00 PM
Re: need help with shell script
could you please read:
http://forums1.itrc.hp.com/service/forums/helptips.do?#41
and then
http://forums1.itrc.hp.com/service/forums/helptips.do?#33
How much time/frustration did the answers save you ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2007 11:27 PM
03-07-2007 11:27 PM
Re: need help with shell script
I really love this forum and I told my HP reps so many times about greatness of this forum and its members. This reply saved me enormous time, hours of my time.
Now I am trying to learn enough to contribute to this forum too, its like paying back to the forum in return for what I gain from it.
Thanks