bug-cpio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-cpio] cpio suggestion: --quick-exit


From: Carl Sopchak
Subject: [Bug-cpio] cpio suggestion: --quick-exit
Date: Fri, 21 Aug 2009 14:18:11 -0400
User-agent: KMail/1.9.10

Hi,

This is a suggestion for a new option to cpio, --quick-exit.  The purpose of 
the option is to exit cpio as soon as the requested file(s) have been 
restored, instead of reading all the way through the archive.  The theory 
behind it is that the archive is more or less organized by directory, and 
once you pass the end of a directory in the archive, it won't appear again.  
This obviously assumes that the --append option wasn't used.  If it was with 
the archive (or if you didn't know), you would not use the --quick-exit 
option.  Also, it would only be useful if a wildcard character in the file(s) 
to be restored were at least one directory down from the root of the archive, 
or if there were no wildcard characters at all.

For example, if cpio was invoked with
        cpio --extract --quick-exit "home/carl/*"
cpio would scan the archive until it came to the home/carl directory, restore 
all of the contents of that directly, then immediately exit.

To be honest, I'm kinda suprised that this hasn't been though of before.  Is 
there a reason why this would be impractical to implement?

I would consider implementing this option, as it would benefit me, but I would 
need someone to point me in the right direction...

Thanks for the consideration,

Carl




reply via email to

[Prev in Thread] Current Thread [Next in Thread]