HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- question on find command
Operating System - HP-UX
        1839864
        Members
    
    
        3085
        Online
    
    
        110156
        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-26-2011 10:41 AM
05-26-2011 10:41 AM
			
				
					
					
						Hi there, I have a simple question I am unable to find an answer to in man, itrc or the internet.
I have been using find in various ways to locate files buried deep into dir structures. I want to make a quick cpio to a nfs share on a disaster recovery server. The command did not work as I expected, copying the directory but it did not copy the directories/files.
cd /
find . -xdev -depth -print | cpio -pdmuv /drnfs/cpio2011May26
This copied say /etc and associated directories but did not copy /mydir/mydir2/myfile123.
I must be missing something easy or not understanding how the find command navigates the directory structure. Any help will be greatly appreciated.
Regards,
Doug
	
			
				
		
			
			
			
			
			
			
		
		
		
	
	
	
I have been using find in various ways to locate files buried deep into dir structures. I want to make a quick cpio to a nfs share on a disaster recovery server. The command did not work as I expected, copying the directory but it did not copy the directories/files.
cd /
find . -xdev -depth -print | cpio -pdmuv /drnfs/cpio2011May26
This copied say /etc and associated directories but did not copy /mydir/mydir2/myfile123.
I must be missing something easy or not understanding how the find command navigates the directory structure. Any help will be greatly appreciated.
Regards,
Doug
Solved! Go to Solution.
- Tags:
- find
		3 REPLIES 3
	
	            
            
		
		
			
            
                - Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2011 11:02 AM
05-26-2011 11:02 AM
Solution
			
				
					
					
						Hi Doug:
The 'find()' did what you told it to do --- don't cross mountpoints.
You limited directory traversal to '/' without visiting any mountpoints (in HP-UX, '/usr', '/var', '/opt', etc.). SInce '/etc' isn't a separate mountpoint it was copied. I have to assume that '/mydir' is a mounted filesystem.
Regards!
...JRF...
		
		
	
	
	
The 'find()' did what you told it to do --- don't cross mountpoints.
You limited directory traversal to '/' without visiting any mountpoints (in HP-UX, '/usr', '/var', '/opt', etc.). SInce '/etc' isn't a separate mountpoint it was copied. I have to assume that '/mydir' is a mounted filesystem.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2011 01:32 PM
05-26-2011 01:32 PM
			
				
					
						
							Re: question on find command
						
					
					
				
			
		
	
			
	
	
	
	
	
			
				
					
					
						remove the -xdev option if you want to traverse on other filesystems.
					
				
			
			
				
			
			
				
			
			
			
			
			
			
		
		
		
	
	
	
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2011 01:49 PM
05-26-2011 01:49 PM
			
				
					
						
							Re: question on find command
						
					
					
				
			
		
	
			
	
	
	
	
	
			
				
					
					
						sheesh, I blew right past that in the man page.  Thanks to both of you.
					
				
			
			
				
			
			
				
			
			
			
			
			
			
		
		
		
	
	
	
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
