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
  • I need help with this. 10-21. Briefly describe the following Linux commands and acronyms. ssh: telnet:...

    I need help with this. 10-21. Briefly describe the following Linux commands and acronyms. ssh: telnet: traceroute: TCP: LAN: DNS: ftp: ssh: ping: env: g++: gcc: 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...

  • 1. Give the command (single command or pipelined series of commands) that performs each of the...

    1. Give the command (single command or pipelined series of commands) that performs each of the following tasks.  Assume bash, and the commands we have been discussing.  Do not use things like perl, awk, python, etc.  Unless specifically stated otherwise, assume that the command should work no matter what your current working directory is or where a user's home directory is located. Use only flags that are required by the question as stated. Assume you are logged in as a "normal" (non-administrator) user,...

  • 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....

  • write the bash script Write a script compress_large_files.sh. This script accepts one or more command line...

    write the bash script Write a script compress_large_files.sh. This script accepts one or more command line arguments. The first argument has to be an integer; let’s call it size. If this is the only command line argument, compress_large_files.sh inspects all files in the current working directory and compresses every file of size at least size. If there is more than one command line argument, all arguments except the first one must be valid directories. In this case, compress_large_files.sh inspects the...

  • write out the appropriate commands for each step using CMD 1, Create a new file named,...

    write out the appropriate commands for each step using CMD 1, Create a new file named, Work1.txt, in the directory HW1a, with the use of the ECHO command with the following sentence 2, Copy the file Work1.txt from directory HW1a to directory HW1aa. 3, Rename the copied file Work1.txt in directory HW1aa to Work2.txt 4, Move the directory HW1aaa to the directory HW1a and rename it HW1ab 5,Move the file Work1.txt from directory HW1a to directory HW1aa 6, Copy both...

  • 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...

  • Print all lines with user id of 1000 or higher in /etc/passwd. Post process the output...

    Print all lines with user id of 1000 or higher in /etc/passwd. Post process the output of ls -al so that only those “files” that have rwx permission for the owner are shown. Post process the output of ls -al so that only those “files” that have rwx permission for others are shown (owner and group may have any permission). List all file names in the current directory, as well as in any subdirectories, that contain the word "foo" anywhere...

  • 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...

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