- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Housekeeping of old files on HP-UX
Operating System - HP-UX
1752806
Members
5577
Online
108789
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
Go to solution
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
тАО01-28-2006 02:20 AM
тАО01-28-2006 02:20 AM
Re: Housekeeping of old files on HP-UX
You can further reduce the time (after xargs use) by limiting the search to alphabetical splits. Remove files from a-d first and then so on and so forth.
find /dir -name "[aA-dD]*" -exec ll -d {} \; |xargs -t rm 2>>/dir/remove.log
find /dir -name "[aA-dD]*" -exec ll -d {} \; |xargs -t rm 2>>/dir/remove.log
There is no substitute to HARDWORK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-28-2006 02:56 AM
тАО01-28-2006 02:56 AM
Re: Housekeeping of old files on HP-UX
Hi:
Removing files in groups (e.g. [A-F], [G-K] etc.) as opposed to in one pass will not gain anything.
By breaking one 'find' into several, you will end up walking the same trees, and 'stat'ing the *same* files multiple times before they are ultimately removed.
The use of 'xargs' in lieu of '-exec' will result in your user's thanking you.
Regards!
...JRF...
Removing files in groups (e.g. [A-F], [G-K] etc.) as opposed to in one pass will not gain anything.
By breaking one 'find' into several, you will end up walking the same trees, and 'stat'ing the *same* files multiple times before they are ultimately removed.
The use of 'xargs' in lieu of '-exec' will result in your user's thanking you.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-30-2006 12:13 AM
тАО01-30-2006 12:13 AM
Re: Housekeeping of old files on HP-UX
well, yeah, something like that _can_ take a long time. as long as it gets done, i don't have a problem with it in general.
now, what your problem is seems to be that the process slows down your system. just let it run, but renice it to begin with. it might even take longer to complete, but at least it will not interfere (much) with the rest of your system.
nice
now, what your problem is seems to be that the process slows down your system. just let it run, but renice it to begin with. it might even take longer to complete, but at least it will not interfere (much) with the rest of your system.
nice
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-30-2006 07:03 AM
тАО01-30-2006 07:03 AM
Re: Housekeeping of old files on HP-UX
So you would:
* Optimize the find by using xargs instead of -exec
and
* Be nicer to the CPU with the "nice" command
A comment to Dirk's "nice" command.
For the command to really be nice to the system you would want to use a positive value!!!
Example:
nice 10 "command"
If you additionally put it to run in background it will be even slightly nicer.
nice 10 "command" &
An unsigned value increases the system nice value causing it to run at lower priority.
A negative value (less nice)=higher priority
Positive value = nicer :-))
because it get lower priority.
/2r
* Optimize the find by using xargs instead of -exec
and
* Be nicer to the CPU with the "nice" command
A comment to Dirk's "nice" command.
For the command to really be nice to the system you would want to use a positive value!!!
Example:
nice 10 "command"
If you additionally put it to run in background it will be even slightly nicer.
nice 10 "command" &
An unsigned value increases the system nice value causing it to run at lower priority.
A negative value (less nice)=higher priority
Positive value = nicer :-))
because it get lower priority.
/2r
I'm trying to become President of the state I'm in...
- « Previous
-
- 1
- 2
- Next »
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