HPE GreenLake Administration
- Community Home
 - >
 - Servers and Operating Systems
 - >
 - Operating Systems
 - >
 - Operating System - HP-UX
 - >
 - Re: Removing log files more than 200000 to 1000000...
 
Operating System - HP-UX
        1840174
        Members
    
    
        2920
        Online
    
    
        110162
        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
Forums
Discussions
Discussions
Discussions
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
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
 
09-13-2008 11:28 PM
09-13-2008 11:28 PM
			
				
					
						
							Removing log files more than 200000 to 1000000 files
						
					
					
				
			
		
	
			
	
	
	
	
	
			
				
					
					
						Dear Experts ,
I have HPUX 11.11 box and i have to remove the directory which contains more than 200000 log files of application . Is there any kernel parameter need to be changed for removing .
Can any one tell me how to remove those log file with in less time period .
I have tried command rm -rf it takes more time .
 
					
				
			
			
				
			
			
				
			
			
			
			
			
			
		
		
		
	
	
	
I have HPUX 11.11 box and i have to remove the directory which contains more than 200000 log files of application . Is there any kernel parameter need to be changed for removing .
Can any one tell me how to remove those log file with in less time period .
I have tried command rm -rf
		3 REPLIES 3
	
	            
            
		
		
			
            
                - Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
09-14-2008 04:47 AM
09-14-2008 04:47 AM
			
				
					
						
							Re: Removing log files more than 200000 to 1000000 files
						
					
					
				
			
		
	
			
	
	
	
	
	
			
				
					
					
						Shalom,
Third one like this.
ls -1 > filelist
while read -r fn
do
rm -f $fn
done < filelist
Done
SEP
		
		
	
	
	
Third one like this.
ls -1 > filelist
while read -r fn
do
rm -f $fn
done < filelist
Done
SEP
	Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
			
			
				
			
			
			
			
			
			
		Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
09-14-2008 05:37 AM
09-14-2008 05:37 AM
			
				
					
						
							Re: Removing log files more than 200000 to 1000000 files
						
					
					
				
			
		
	
			
	
	
	
	
	
			
				
					
					
						hi,
what about renaming the directory "away", recreate it for new logs and then slowly delete the old?
see also thread http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1268712
rgds
HGH
					
				
			
			
				
			
			
				
			
			
			
			
			
			
		
		
		
	
	
	
what about renaming the directory "away", recreate it for new logs and then slowly delete the old?
see also thread http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1268712
rgds
HGH
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
09-15-2008 04:42 AM
09-15-2008 04:42 AM
			
				
					
						
							Re: Removing log files more than 200000 to 1000000 files
						
					
					
				
			
		
	
			
	
	
	
	
	
			
				
					
					
						Try this.
# touch -amt 200504150000 /tmp/ref1
# touch -amt 200802282359 /tmp/ref2
# find "DIR" -xdev -type f -newer /tmp/ref1 -a ! -newer /tmp/ref2 -exec rm {} \+
This will remove files that are newer (more recently modified) than April 15 at 0000 2005 AND NOT newer than Feb, 28th 2359 of this year. This can be modified to do ANYTHING. Touch is an awesome way to remove stuff.
					
				
			
			
				
		
		
	
	
	
# touch -amt 200504150000 /tmp/ref1
# touch -amt 200802282359 /tmp/ref2
# find "DIR" -xdev -type f -newer /tmp/ref1 -a ! -newer /tmp/ref2 -exec rm {} \+
This will remove files that are newer (more recently modified) than April 15 at 0000 2005 AND NOT newer than Feb, 28th 2359 of this year. This can be modified to do ANYTHING. Touch is an awesome way to remove stuff.
	There are two types of people in the world, Marines and those who wish they were.
			
			
				
			
			
			
			
			
			
		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.
		
	
	
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP