HPE GreenLake Administration
- Community Home
 - >
 - Servers and Operating Systems
 - >
 - Operating Systems
 - >
 - Operating System - Linux
 - >
 - Re: tar with absolute patch
 
Operating System - Linux
        1840190
        Members
    
    
        5421
        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
 
10-30-2006 08:07 PM
10-30-2006 08:07 PM
			
				
					
						
							tar with absolute patch
						
					
					
				
			
		
	
			
	
	
	
	
	
			
				
					
					
						Hi,
I have a tar file
xx.tar
It contains files with absolute path such as
/Arr/bla/tra/myfile.txt
/Arr/bla/tra/myfile1.txt
/Arr/bla/tra/myfile2.txt
.
.
.
I need to extract files from tar and put them in another directory such as :
/XX/YY/TT
how can I do so ?
many thanks
Angelo
					
				
			
			
				
			
			
				
			
			
			
			
			
			
		
		
		
	
	
	
I have a tar file
xx.tar
It contains files with absolute path such as
/Arr/bla/tra/myfile.txt
/Arr/bla/tra/myfile1.txt
/Arr/bla/tra/myfile2.txt
.
.
.
I need to extract files from tar and put them in another directory such as :
/XX/YY/TT
how can I do so ?
many thanks
Angelo
		3 REPLIES 3
	
	            
            
		
		
			
            
                - Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
10-31-2006 09:26 AM
10-31-2006 09:26 AM
			
				
					
						
							Re: tar with absolute patch
						
					
					
				
			
		
	
			
	
	
	
	
	
			
				
					
					
						Howdy,
If you can't dereference the absolute pathname how about creating a symbolic link with the path that the tar file is expecting? Make the symlink point to where you actually want the files to appear then delete the link after wards.
HTH
Ian
		
		
	
	
	
If you can't dereference the absolute pathname how about creating a symbolic link with the path that the tar file is expecting? Make the symlink point to where you actually want the files to appear then delete the link after wards.
HTH
Ian
	Hope that helps - please click "Thumbs up" for Kudos if it does
## ---------------------------------------------------------------------------##
Which is the only cheese that is made backwards?
Edam!
Tweets: @2techie4me
			
			
				
			
			
			
			
			
			
		## ---------------------------------------------------------------------------##
Which is the only cheese that is made backwards?
Edam!
Tweets: @2techie4me
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
10-31-2006 05:31 PM
10-31-2006 05:31 PM
			
				
					
						
							Re: tar with absolute patch
						
					
					
				
			
		
	
			
	
	
	
	
	
			
				
					
					
						On Linux, GNU tar will remove leading '/'.
#tar xf mw.tar
tar: Removing leading `/' from member names
Don't be root.
There is a special option for not removing leading '.' (-P, check manpage).
JP
		
		
	
	
	
#tar xf mw.tar
tar: Removing leading `/' from member names
Don't be root.
There is a special option for not removing leading '.' (-P, check manpage).
JP
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
10-31-2006 05:32 PM
10-31-2006 05:32 PM
			
				
					
						
							Re: tar with absolute patch
						
					
					
				
			
		
	
			
	
	
	
	
	
			
				
					
					
						Shalom Angelo,
Yes.
options:
mv the tar file to the top of the absolute path and tar xvf it there.
-C directory option at unzip time.
Example:
tar -xvf foo.tar -C bar/
Its all from the man page because I don't trust my memory.
SEP
					
				
			
			
				
		
		
	
	
	
Yes.
options:
mv the tar file to the top of the absolute path and tar xvf it there.
-C directory option at unzip time.
Example:
tar -xvf foo.tar -C bar/
Its all from the man page because I don't trust my memory.
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
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