On Jun 16, 2022, at 3:47 PM, Eric Lease Morgan <[email protected]> wrote:
> 
> 
>> On Jun 16, 2022, at 11:54 AM, Eric Lease Morgan <[email protected]> wrote:
>> 
>> I need help uncompressing a tar file...
> 
> 
> I believe I have resolved this problem.
> 
> Indeed, I believe AFS was getting confused by both the number of files and 
> the lengths of the file names. To overcome this problem, I:
> 
>  1. copied the tar file to my (Macintosh) desktop
>  2. uncompressed it
>  3. used the attached Perl script to subdivide the desired
>     files into subdirectories (because the number of files
>     is too big and the file names are too long for single
>     AFS directory entries)
>  4. zipped up the subdirectories
>  5. copied the zip file back to the AFS space
>  6. uncompressed the whole
> 
> All of this is good enough for me; fun with high performance computing.

I’m a bit late to the party, but if you’re ever in the situation where you 
don’t have sufficient disk space on an alternate file system, I suspect that 
you could dump the listing (-tv), then write a program to extract file by file 
into the directory structure you’d prefer.

Although for a file that large, it might be better to try to extract all files 
that need to be in a (sub)directory at once so it doesn’t have to seek through 
the tarball a few million times.


> By the way, my Macintosh successfully uncompressed the archive, but the 
> resulting file system was seemingly created as read-only. Weird, but 
> functional. Maybe it was doing me a favor? 

Most implementations of tar support file permissions these days.  Some will 
also support FACLs and xattrs.  Also beware that when you untar as root, you 
have to be careful because it will restore user & group ownership of the files 
(by UID/GID, which may not match on the system you’re restoring to)

-Joe

Ps.  Yay, Perl!

Reply via email to