HPE GreenLake Administration
- Community Home
 - >
 - Servers and Operating Systems
 - >
 - Operating Systems
 - >
 - Operating System - HP-UX
 - >
 - question about using find command
 
Operating System - HP-UX
        1840180
        Members
    
    
        3764
        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
	
		
			
            
                
            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
 
05-03-2006 04:00 AM
05-03-2006 04:00 AM
			
				
					
					
						I am trying to use the mtime or ctime on a find command to only find files older then 4 hours in a specific directory.  Can this be done with these options? or another way? this is on a HPUX 11i L RP8400 class server.
thanks
					
				
			
			
				
	
			
				
		
			
			
			
			
			
			
		
		
		
	
	
	
thanks
	Never underestimate the power of stupid people in large groups
			
			
				Solved! Go to Solution.
		3 REPLIES 3
	
	            
            
		
		
			
            
                - Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
05-03-2006 04:05 AM
05-03-2006 04:05 AM
			
				
					
						
							Re: question about using find command
						
					
					
				
			
		
	
			
	
	
	
	
	
			
				
					
					
						Those find flags work on multiples of 24 hours, so a 4 hour timespan won't work.
					
				
			
			
				
			
			
				
			
			
			
			
			
			
		
		
		
	
	
	
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
05-03-2006 04:05 AM
05-03-2006 04:05 AM
Solution
			
				
					
					
						If you use the "touch" command to create a temp file with the exact date time of 4 hours ago, then you can use the -newer option.
 
example-
 
touch -t 200605030900 /tmp/testfile
find . ! -newer /tmp/testfile -print
 
HTH
 
-- Rod Hills
		
		
	
	
	
example-
touch -t 200605030900 /tmp/testfile
find . ! -newer /tmp/testfile -print
HTH
-- Rod Hills
	There be dragons...
			
			
				
			
			
			
			
			
			
		- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
05-03-2006 08:32 PM
05-03-2006 08:32 PM
			
				
					
						
							Re: question about using find command
						
					
					
				
			
		
	
			
	
	
	
	
	
			
				
					
					
						Hi Mark,
teh way to create a file by touch and using it to find file older than it it the good one.
But if you need to use it into a csript you have the problem to create file with timestamp of 4 hours ago.
Do to this you need or caljd script or mktime program in C.
Check out A. Clay's newest version of caljd.sh (and caljd.pl) at this thread.
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x1fb33a7b3682d611abdb0090277a
778c,00.html
HTH,
Art
					
				
			
			
				
			
			
				
			
			
			
			
			
			
		
		
		
	
	
	
teh way to create a file by touch and using it to find file older than it it the good one.
But if you need to use it into a csript you have the problem to create file with timestamp of 4 hours ago.
Do to this you need or caljd script or mktime program in C.
Check out A. Clay's newest version of caljd.sh (and caljd.pl) at this thread.
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x1fb33a7b3682d611abdb0090277a
778c,00.html
HTH,
Art
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