1. Use the tar_archiver.py (from below) as a command to make a tar archive of /tmp...
Fantastic news! We've Found the answer you've been seeking!
Question:
![](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2023/09/64ff032917850_1694434090028.jpg)
![](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2023/09/64ff033694823_1694434104182.jpg)
![](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2023/09/64ff034c0e9e7_1694434125445.jpg)
![](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2023/09/64ff035f6706b_1694434145264.jpg)
![](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2023/09/64ff0371cff7e_1694434163617.jpg)
Transcribed Image Text:
1. Use the tar_archiver.py (from below) as a command to make a tar archive of /tmp called mytmp.tar. You'll notice that even after hitting enter to run the command, you still needed to give more data to your script (to tell it which directory you wanted to archive, what to call it, and what compression to use). Requiring this much interaction from the user means that this script is not very good for automation. We can't schedule this script to automatically run, because we (or another admin) need to be present to type @nswers to the prompts. Here is the tar_archiver.py: #!/usr/bin/env python3 import os # Ask user for the directory to archive directory = input ("Enter the directory to archive: ") # Ask user to enter the name for the archive archive_name = input ("Enter the name for the archive: ") # Ask user if they want to compress the archive compress = input ("Would you like to compress the archive? (y/n): ") # If user wants archive to compress let them choose options if compress == "y": while True: compress = input("Enter the type of compression (gzip/bzip2/xzip): ") if compress in ["gzip", "bzip2", "xzip"]: break else: print("Choosee from gzip/bzip2/xzip only.") # a tar command to archive the directory tar_command = f"tar -cvf (archive_name}.tar (directory}" 1. Use the tar_archiver.py (from below) as a command to make a tar archive of /tmp called mytmp.tar. You'll notice that even after hitting enter to run the command, you still needed to give more data to your script (to tell it which directory you wanted to archive, what to call it, and what compression to use). Requiring this much interaction from the user means that this script is not very good for automation. We can't schedule this script to automatically run, because we (or another admin) need to be present to type @nswers to the prompts. Here is the tar_archiver.py: #!/usr/bin/env python3 import os # Ask user for the directory to archive directory = input ("Enter the directory to archive: ") # Ask user to enter the name for the archive archive_name = input ("Enter the name for the archive: ") # Ask user if they want to compress the archive compress = input ("Would you like to compress the archive? (y/n): ") # If user wants archive to compress let them choose options if compress == "y": while True: compress = input("Enter the type of compression (gzip/bzip2/xzip): ") if compress in ["gzip", "bzip2", "xzip"]: break else: print("Choosee from gzip/bzip2/xzip only.") # a tar command to archive the directory tar_command = f"tar -cvf (archive_name}.tar (directory}"
Expert Answer:
Answer rating: 100% (QA)
1 Open a terminal window 2 Navigate to the directory where the tararchiverpy script is located 3 Run the following command 4 When prompted enter the directory to archive eg tmp 5 When prompted enter t... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
ABC had the following income statement for the period ending on December 31, 2020. Income Statement for the year ended 31/12/2020 Net Sales 120,000 Cost of Goods Sold 80,000 Gross Profit 40,000...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
It was 5:30 Friday afternoon, January 22, 2016. Bill Hall, the chairman and CEO of National Brands Inc. was clearing up the last of the papers on his desk and was looking forward to a relaxing...
-
Water is pumped in through the bottom of the tank in Exercise 19. How much work is done to fill the tank (a) To a depth of 2 feet? (b) From a depth of 4 feet to a depth of 6 feet? Data from in...
-
Suppose that five independent observations are drawn from the continuous pdf f T (t) =2t, 0t 1. Let X denote the number of ts that fall in the interval 0t < 1/3 and let Y denote the number of ts that...
-
Suppose the country of Petria is seeking membership in a currency union, the CU, that uses a currency unit called the curo. The exchange rate is currently 2 Petrian dollars per curo. Petrias...
-
Some firms experience material seasonal variations in revenues. U.S. GAAP requires firms to disclose the seasonal nature of their activities in their interim financial statements. Search the FASBs...
-
The following pertains to the Cereal Division of McKenzie Corporation. Conversion costs for this division were 80 percent complete as to beginning work-in-process inventory and 50 percent complete as...
-
wendy corporation issued $100000, 12%, 5-year bonds on January 1 20x1 for $92,280 The bonds will yield a 12% return. Interest is paid semiannually on Januay 1 and July 1. The first interest payment...
-
Using the 4-quarter moving average: What is the forecast for 3Q 2022, 4Q 2022, 1Q 2023, and 2Q 2023 2. Compute the forecast for 3Q 2022, 4Q 2022, 1Q 2023, and 2Q 2023 using exponential smoothing...
-
In your internship with Lewis, Lee, & Taylor Inc. you have been asked to forecast the firm's additional funds needed (AFN) for next year. The firm is operating at full capacity. Data for use in your...
-
From the perspective of organizational structure, design, and control, what have gone wrong at PNB? What factors have contributed to its current state of disarray? What should be done next to help...
-
Your goal is to advise the President on domestic economic policy. Role You are the chair of the Council of Economic Advisors (CEA) Audience Your audience is the President of the United States....
-
omework quiz 2.1 #1 stem plot The miles per gallon rating for 30 cars are shown below (lowest to highest). 19, 19, 19, 20, 21, 21, 25, 25, 25, 26, 26, 28, 29, 31, 31, 32, 32, 33, 34, 35, 36, 37, 37,...
-
Your answers are saved automatically. Question Completion Status: QUESTION 1 13 points Save Answer Library A computer memory manufacturer specifies that its memory chip stores data incorrectly an...
-
Analyze the possible reasons for and responses to Chung's request for a private office. What factors might impact Leary's decision? Identify at least two challenges and dilemmas in managing...
-
Sales-related and purchase-related transactions using perpetual inventory system. The following were selected from among the transactions completed by Babcock Company during November of the current...
-
Provide a few individual examples who revealed what aspects of emotional intelligence?
-
Leslie is a single taxpayer who is under age 65 and in good health. For 2012, she has a salary of $23,000 and itemized deductions of $1,000. Leslie is entitled to one exemption on her tax return. a....
-
How much of each of the following prizes or awards is taxable? a. Cheline received a $50,000 gift bag at the Oscars in 2012. b. Jon received a gold watch worth $350 for 25 years of service to his...
-
Carl and Jenny adopt a Russian orphan. The adoption takes 2 years and two trips to Russia and is final in 2012. They pay $6,000 in 2011 and $7,500 in 2012 of qualified adoption expenses, and have AGI...
-
Endofperiod adjustments LO5 A physical count of inventories at 31 December 2020 revealed that Katoomba Pty Ltd had inventories on hand at that date with a cost of $441 000. Katoomba Pty Ltd uses...
-
Assignment of cost (periodic and perpetual methods) LO4, 5, 6 Darwin Ltds inventories transactions for April 2021 are shown below. Purchases Cost of sales Balance Date No. units Unit cost Total...
-
Recording inventories transactions LO3, 4 William Ltd began business on 1 March 2021. William Ltd balances the books at monthend and uses the periodic method. William Ltds transactions for March...
![Mobile App Logo](https://dsd5zvtm8ll6.cloudfront.net/includes/images/mobile/finalLogo.png)
Study smarter with the SolutionInn App