Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

tar parm to ignore folders

Status
Not open for further replies.

thedaver

IS-IT--Management
Joined
Jul 12, 2001
Messages
2,741
Location
US
I need to extract from a tar zgip archive that has folders stored in it. I cannot find from the 'man' which param tells 'tar zxvf' to ignore the folders and untar the files without folder structure from the archive.

????

Surfinbox.com Business Internet Services - National Dialup, DSL, T-1 and more.
 
Is it a hazard it has not reply ?
 
The only way is to tar the files without the directory structure in the first place!

If files were tar'ed with incomplete path (path not beginning with '/') a work-around is to un-tar into some temp directory and then move (mv) to destination location.


----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
Or perhaps consider pax. If there are not too many files, you can rename them interactively, alternatively, look at the -s option in the man pages.

However, as LKBrwnDBA says, check how the files were written in the first place with tar ztvf (this won't overwrite anything, just display to the screen).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top