Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7907163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T11:18:07+00:00 2026-06-03T11:18:07+00:00

Question: I want to untar a tarfile which has many tar files within itself

  • 0

Question:

I want to untar a tarfile which has many tar files within itself and remove the files in all the tar files and I want all of these processes to run in parallel in Unix bash scripting.

Conditions:

  1. The script should return an error if any untar/remove process has any error.
  2. It should only return success after all N (untar and remove) processes complete successfully.

Proposed solution:

 mkdir a
 tar -C a -xvf b.tar
 cd a
 for i in *
 do
 rm -r $i &
 done
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T11:18:15+00:00Added an answer on June 3, 2026 at 11:18 am
    mkdir a
    tar -C a -xvf b.tar
     cd a
     success=$(for i in *
     do
     rm -r $i || echo failed & # if a job fails false will be echoed
     done
     wait)
     # if any of the jobs failed, success will be set to a value other than ""
     [[ -z "$success" ]] && exit 0 || exit 1
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First question : I want to replace all characters other than alphanumeric and Special
Question: I want to implement a sessionAccess class, which throws a SessionExpired-Exception when an
Question: I want to programmatically find image files of a personal nature. What characteristics
these are the some silly question ..i want to ask..please help me to comprehend
Question: I want to search the subnet for all computers in it. So I
Question: I want to add a unique constraint on a mapping table (n:n). I
Question: I want code for: syntax highlighting (of programming languages) Language: C# or assembly
Similar Stack Overflow Question I want users to be able to search through my
I have a little question I want to click on my smileys and insert
There are actually 2 question i want to cover in this topic. 1) Is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.