Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Some tar ideas (not tested yet):
- #If one has a subfolder then rather than:
- tar --keep-directory-symlink -xf package.tar -C /
- #**--one-top-level[=DIR] option might be able to be used insead of "-C /"
- #one can do:
- tar --keep-directory-symlink --transform='s%package-name/%%' -xf package.tar -C /
- #See: https://www.gnu.org/software/tar/manual/html_section/tar_51.html
- #Files can also be excluded from a tar archive either by:
- cpio -i --nonmatching='metadata.asc' / < package.tar
- # shell patters See: http://man7.org/linux/man-pages/man3/glob.3.html
- tar --exclude=PATTERN -xf package.tar -C /
- #One can put the exclude patterns in a file
- tar --exclude-from=FILE -xf package.tar -C /
- #If a tar archive is concatenated with metadata when one might be able to do sometihng like
- tar --transform='s%package-name%%' -x \
- -f <(tar -x --to-stdout --nonmatching='metadata.asc' -f package.pet.tar) \
- -C /
- #or
- tar -x --files-from <<<package-name package.tar -C /
- #or
- cpio -i -E 'package-name/*' / < package.tar
Add Comment
Please, Sign In to add comment