Question

I need help with this. 22. Show a command that will create a file named "etc.tar"...

I need help with this.

22. Show a command that will create a file named "etc.tar" in your home directory from recursively going through all of the files in the "/etc" directory. In other words, the "etc.tar" file will include the files in the "/etc" directory as well as all of its subdirectories. IMPORTANT: This command must work for any user as well as work from any directory.  

23. In bash, multiple commands can appear on a single command line when they are separated by certain one to two character control operators. Excluding the newline command initiator, list five other control operators which separate commands.  
0 0
Add a comment Improve this question Transcribed image text
Answer #1

22 ) The following command will create etc.tar in home directory by recursively going through all files in /etc directory.

                             sudo tar -cvf /home/etc.tar /etc

23 )

-> ;

This executes command right to it irrespective of whether the command left to it executed successfully or not.

-> &&

This executes command right to it only if the command left to it is executed successfully.

-> ||

This executes command right to it only if the command left to it is not executed successfully.

-> | (pipe)

This sends the standard output of command left to it to the standard input of the command right to it.

But the standard error still goes into its default destination.

-> |&

Same as above but standard error also goes to the command right of it.

Add a comment
Know the answer?
Add Answer to:
I need help with this. 22. Show a command that will create a file named "etc.tar"...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • LINUX 140U Create a file named script1.sh that contains a bash script that: Accepts NO command...

    LINUX 140U Create a file named script1.sh that contains a bash script that: Accepts NO command line arguments and does NOT use the read command. I will give you no credit if your bash script includes a read command. Also, you need to have at least one for..in loop in your code even if there may be other ways to do this problem. The script will go through a list of entries in the current directory (do not process subdirectories):...

  • 20. Write the DOS command to erase a file named FILEBILL which is stored in the...

    20. Write the DOS command to erase a file named FILEBILL which is stored in the sub-directory named MYFILES located at the root of drive C. 21. Write the DOS command to return you to the root of drive C if your current directory is C:\TEACHING OPSYS\SUMM 22. Write the DOS command to erase all the files on drive A. 23. Write the DOS command to delete a subdirectory named DIRFRED which is located at the root of drive C....

  • Question for Windows CLI At the administrative command prompt, cd into c:\, create a directory named...

    Question for Windows CLI At the administrative command prompt, cd into c:\, create a directory named GOPdir, and within it, another directory called trumpdir. Set the permissions on the trumpdir directory so that the user trump can modify it, any other members of the republicans group can only read it, and no one else can do anything with it. (If someone is listed as belonging to both the republicans group and another group, they should still be allowed to read...

  • Question for Windows CLI At the administrative command prompt, cd into c:\, create a directory named...

    Question for Windows CLI At the administrative command prompt, cd into c:\, create a directory named GOPdir, and within it, another directory called trumpdir. Set the permissions on the trumpdir directory so that the user trump can modify it, any other members of the republicans group can only read it, and no one else can do anything with it. (If someone is listed as belonging to both the republicans group and another group, they should still be allowed to read...

  • LINUX QUESTIONS (dont have to display output, I will be running these commands myself to check...

    LINUX QUESTIONS (dont have to display output, I will be running these commands myself to check the output) Display the command(s) used to do the following: create an empty file called history by using just a redirection operator. Verify and show. Show/verify all results (i.e., all commands and their corresponding outputs). Wait 1 minute or more and then display the command(s) used to do the following: change the timestamp on the history file you just created. Verify/display the change. Show/verify...

  • Linux command problem, please help thank you! Chapter X Exercise 07: midLS Exercise 07 midLS Turn-in...

    Linux command problem, please help thank you! Chapter X Exercise 07: midLS Exercise 07 midLS Turn-in directory: er07/ Files to turn in: midLS Allowed functions: None Notes: a/a In a midLs file, place the command line that will list all files and directories in your current directory (except for hidden files or any file that starts by a dot - yes, that includes double-dots), separated by a comma, by order of creation date. Make sure directories' names are followed by...

  • do numbers 4-8 4. Given any directory, use the Is command to display: • all files...

    do numbers 4-8 4. Given any directory, use the Is command to display: • all files and sub-directories starting with the letter "D" (note do not list anything in any sub-directory) • its immediate sub-directories (sub-directories only, and no other ordinary files) its immediate hidden sub-directories only - take a screenshot (#3-3) that clearly shows the command and the result. 5. Assume that the following files are in the working directory: $ ls intro notesb ref2 section 1 section3 section4b...

  • Really need help from 11 on: Create the directory structure IFT383FinalExam/Activities/Activity1 in your home directory. Using...

    Really need help from 11 on: Create the directory structure IFT383FinalExam/Activities/Activity1 in your home directory. Using the cat command, create a file named classRoster with the following fields, separated by a comma. Student ID First Name Last Name Grade Program of Study ASURITE ID (username) Add three records to your file. Display the contents of the file. Move the file classRoster to the directory Activity1. Go to the Activity1 directory. Display the directory you are in. Add read, write and...

  • Hello, please help with the following, you're tasked with writing a shell script named “rpsm.sh”....

    Hello, please help with the following, you're tasked with writing a shell script named “rpsm.sh”. The script reports and prints (to stdout) selected storage management information. Think of it as “RePort Storage Management”. The easy way to describe what the script needs to do is to look at what it should display in the case where you provide incorrect parameters, or in the case where you provide “-h” for help: Usage: ./rpsm.sh <options>< directory> Reports selected information about specified directory...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT