Skip to main content
deleted 90 characters in body
Source Link
mikeserv
  • 59.4k
  • 10
  • 123
  • 244

you can do:

pax <some.tar

...to list the contents of a tar file.

if you want to know how many levels deep it goes, you can do:

pax <some.tar | tr -dc /\\n | sort -r | head -n1

you can explicitly forbid an explosion on extraction with:

mkdir some.tar
pax -'rs|'rs|^|some.*tar/||'|' <some.tar

but if there are multiple identical basenames in the archive only one of those will survive the process, of course.

you can do:

pax <some.tar

...to list the contents of a tar file.

if you want to know how many levels deep it goes, you can do:

pax <some.tar | tr -dc /\\n | sort -r | head -n1

you can explicitly forbid an explosion on extraction with:

pax -'rs|.*/||' <some.tar

but if there are multiple identical basenames in the archive only one of those will survive the process, of course.

you can do:

pax <some.tar

...to list the contents of a tar file.

if you want to know how many levels deep it goes, you can do:

pax <some.tar | tr -dc /\\n | sort -r | head -n1

you can explicitly forbid an explosion on extraction with:

mkdir some.tar
pax -'rs|^|some.tar/|' <some.tar
added 213 characters in body
Source Link
mikeserv
  • 59.4k
  • 10
  • 123
  • 244

you can do:

pax <some.tar

...to list the contents of a tar file.

if you want to know how many levels deep it goes, you can do:

pax <some.tar | tr -dc /\\n | sort -r | head -n1

you can explicitly forbid an explosion on extraction with:

pax -'rs|.*/||' <some.tar

but if there are multiple identical basenames in the archive only one of those will survive the process, of course.

you can do:

pax <some.tar

...to list the contents of a tar file.

if you want to know how many levels deep it goes, you can do:

pax <some.tar | tr -dc /\\n | sort -r | head -n1 

you can do:

pax <some.tar

...to list the contents of a tar file.

if you want to know how many levels deep it goes, you can do:

pax <some.tar | tr -dc /\\n | sort -r | head -n1

you can explicitly forbid an explosion on extraction with:

pax -'rs|.*/||' <some.tar

but if there are multiple identical basenames in the archive only one of those will survive the process, of course.

Source Link
mikeserv
  • 59.4k
  • 10
  • 123
  • 244

you can do:

pax <some.tar

...to list the contents of a tar file.

if you want to know how many levels deep it goes, you can do:

pax <some.tar | tr -dc /\\n | sort -r | head -n1