Skip to main content
Formatting
Source Link
AdminBee
  • 23.6k
  • 25
  • 55
  • 77

everyone.

WouldI would like to know if it is possible to extract a specific file inside tartar file using find command.

Example:

Normal situation:

tar xvf tarfilename file1 # find filaname called "file1" and extract

My Situation:

find . -iname "tar" -exec tar -xvf file1 {} ; # I Don't know if possible to do.

  • Normal situation: find filaname called "file1" and extract

    tar xvf tarfilename file1 
    
  • My Situation:

    find . -iname "*tar*" -exec tar -xvf *file1* {} \;
    

    I don't know if possible to do.

Reason:

My internal prod system is not allowed to run tartar command.

I know that the best practice is running tar directly, but the hope dies last

Thanks in advance.

everyone.

Would like to know if possible to extract a specific file inside tar file using find command.

Example:

Normal situation:

tar xvf tarfilename file1 # find filaname called "file1" and extract

My Situation:

find . -iname "tar" -exec tar -xvf file1 {} ; # I Don't know if possible to do.

Reason:

My internal prod system is not allowed to run tar command.

I know that the best practice is running tar directly, but the hope dies last

Thanks in advance.

I would like to know if it is possible to extract a specific file inside tar file using find command.

Example:

  • Normal situation: find filaname called "file1" and extract

    tar xvf tarfilename file1 
    
  • My Situation:

    find . -iname "*tar*" -exec tar -xvf *file1* {} \;
    

    I don't know if possible to do.

Reason:

My internal prod system is not allowed to run tar command.

I know that the best practice is running tar directly, but the hope dies last

Thanks in advance.

Source Link

How to extract specific files using FIND + TAR command

everyone.

Would like to know if possible to extract a specific file inside tar file using find command.

Example:

Normal situation:

tar xvf tarfilename file1 # find filaname called "file1" and extract

My Situation:

find . -iname "tar" -exec tar -xvf file1 {} ; # I Don't know if possible to do.

Reason:

My internal prod system is not allowed to run tar command.

I know that the best practice is running tar directly, but the hope dies last

Thanks in advance.