Mohankumar wrote: > I've the GNU tar utility 1.13.25 (windows). > > I've an archive with few backup files. Every file has its own > absolute path (ie., C:\Progra~1\Backup\config.txt) in the tar > archive. > > While extracting this tar, it will be extracted to the same location > C:\Progra~1\Backup\config.txt). I've tried with -C (to extract to > different directory) option as well. > > I want to extract this tar to some other temporary directory in > different drive (say, D:\MyTemp) > > Is there an option to achieve this? > > Thanks in Advance!
Don't know of one. Best advice is to avoid using an absolute path, when you create the archive. Create your archives this way: cd /dir/to/backup && tar cf /archive/dir/my_backup.tar . then you can extract them anywhere you want. This advice applies equally to use of tar on Windoze or on *nix. Get into the habit of *never* specifying absolute paths for the files you are archiving with tar. For your present problem, unless you can recreate the archive directly, you may need to unpack to the absolute location, recreate with relative paths, and then delete the files you unpacked. Try tar xvf my_archive.tar > my_archive.log then use my_archive.log as a reference for files to delete; (hint: convert it to a batch file, edit it to execute 'del' on each file, then run it). Regards, Keith. ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information _______________________________________________ GnuWin32-Users mailing list GnuWin32-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnuwin32-users