HPE GreenLake Administration
- Community Home
 - >
 - Servers and Operating Systems
 - >
 - Operating Systems
 - >
 - Operating System - Linux
 - >
 - Re: during copy
 
Operating System - Linux
        1840188
        Members
    
    
        3676
        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
 
02-07-2005 09:14 AM
02-07-2005 09:14 AM
			
				
					
						
							during copy
						
					
					
				
			
		
	
			
	
	
	
	
	
			
				
					
					
						Red Hat Enterprise Linux 3.0 update 4.
What happend in the internals of O.S. during a copy of a file?
I want to put to work a crontab process to copy a file into another file every X seconds. This is:
FILE1 and FILE2 are copied alternatively to FILEPROD every 5 seconds. Second 5 FILE1->FILEPROD, second 10 FILE2->FILEPROD and so on.
What happend with an application which try to access this file to read during the moment of the copy? Is the state of the file locked during the copy and the program just needs to re-tray? or what happend?
					
				
			
			
				
			
			
				
			
			
			
			
			
			
		
		
		
	
	
	
What happend in the internals of O.S. during a copy of a file?
I want to put to work a crontab process to copy a file into another file every X seconds. This is:
FILE1 and FILE2 are copied alternatively to FILEPROD every 5 seconds. Second 5 FILE1->FILEPROD, second 10 FILE2->FILEPROD and so on.
What happend with an application which try to access this file to read during the moment of the copy? Is the state of the file locked during the copy and the program just needs to re-tray? or what happend?
		3 REPLIES 3
	
	            
            
		
		
			
            
                - Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
02-07-2005 01:24 PM
02-07-2005 01:24 PM
			
				
					
						
							Re: during copy
						
					
					
				
			
		
	
			
	
	
	
	
	
			
				
					
					
						Hi Tonatiuh ,
Show your crontab for me to solve the problem.
NiCK
		
		
	
	
	
Show your crontab for me to solve the problem.
NiCK
	just for fun
			
			
				
			
			
			
			
			
			
		- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
02-08-2005 12:42 AM
02-08-2005 12:42 AM
			
				
					
						
							Re: during copy
						
					
					
				
			
		
	
			
	
	
	
	
	
			
				
					
					
						AFAIK, there is no problem to read file during copying, you will get *old* version of file.
BTW, check "rsync" as replacement for copy.
		
		
	
	
	
BTW, check "rsync" as replacement for copy.
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
02-08-2005 02:04 AM
02-08-2005 02:04 AM
			
				
					
						
							Re: during copy
						
					
					
				
			
		
	
			
	
	
	
	
	
			
				
					
					
						unix file locks are very good this way. unix and linux only maintain locks for the actual second you're writing data, where as windows will* maintain locks for the entire time the file handle is open.
*generally, the actual file handling depends on the API's in use, and the programers declination. unix programs CAN lock files for indeterminate times, and windows programs CAN release locks quickly.
recently microsoft has been encouraging developers to release file locks in a more timly fashion, the .net APIs include TONS of file access routeens that release locks almost instantly.
		
		
	
	
	
*generally, the actual file handling depends on the API's in use, and the programers declination. unix programs CAN lock files for indeterminate times, and windows programs CAN release locks quickly.
recently microsoft has been encouraging developers to release file locks in a more timly fashion, the .net APIs include TONS of file access routeens that release locks almost instantly.
	There have been Innumerable people who have helped me. Of course, I've managed to piss most of them off.
			
			
				
			
			
			
			
			
			
		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