Skip to main content
deleted 20 characters in body
Source Link
wulfgarpro
  • 793
  • 1
  • 6
  • 9

Is it possible to create a target directory, similar in nature to the mkdir -p switch, where I can define a non-existent target directory within my tar command, and tar will create the directory for me?

I know I can redirctredirect the output to a directory using tar -C /target/dir, but this doesn't work if the target directory is non-existent.

Is it possible to create a target directory, similar in nature to the mkdir -p switch, where I can define a non-existent target directory within my tar command, and tar will create the directory for me?

I know I can redirct the output to a directory using tar -C /target/dir, but this doesn't work if the target directory is non-existent.

Is it possible to create a target directory, similar to mkdir -p, where I can define a non-existent target directory within my tar command, and tar will create the directory for me?

I know I can redirect the output to a directory using tar -C /target/dir, but this doesn't work if the target directory is non-existent.

Source Link
wulfgarpro
  • 793
  • 1
  • 6
  • 9

Create target directory when extracting tarball

Is it possible to create a target directory, similar in nature to the mkdir -p switch, where I can define a non-existent target directory within my tar command, and tar will create the directory for me?

I know I can redirct the output to a directory using tar -C /target/dir, but this doesn't work if the target directory is non-existent.