Write unix commands, Computer Engineering

Assignment Help:

For the following, cmd1 and cmd2 are arbitrary UNIX commands, and file1 and file2 are files owned by you. Write UNIX (bash) commands to:

(a) Run cmd1 and append its output to file1.

(b) Run cmd1, and if it returns a status of 0, run cmd2.

(c) Run cmd1 and redirect both standard output and standard error to file1.

(d) Compare file1 and file2 (as text files).

(e) Run cmd1 passing the names of all files in the current directory as arguments.

(f) Replace file1 with the output of cmd1.

(g) Sort file1 and store the result in file2.

(h) Run cmd1 in the background at low priority.

(i) Set the environment variable $FOO to "Hello"

(j) Set permissions so that anyone may execute file1.

(k) Set permissions on file1 and file2 so that anyone can read them but only you can edit them.

(l) Set permissions on dir1 so that anyone may list the files in it, or read or execute those files, but only you can add or remove files.

(m) Kill the process with process ID 12345.

(n) Show what background processes are currently running.

(o) Show the owners and permissions for file1 and file2.

(p) Print all lines in file1 containing "foo".


Related Discussions:- Write unix commands

Determine the nand gate, Find out the two inputs when the NAND gate output ...

Find out the two inputs when the NAND gate output will be low. Ans. The output of NAND gate will be low if the two inputs are 11. The Truth Table of NAND gate is shown

What are the largest UDP messages, What are the largest UDP messages that c...

What are the largest UDP messages that can fit into single Ethernet frame? UDP utilizes IP for delivery. As ICMP UDP packet is encapsulated in IP datagram. Therefore entire UDP

State the term in detail $strobe, State the term in detail $strobe $str...

State the term in detail $strobe $strobe. This task is very similar to $display task except for a slight difference.  If many other statements are executed in same time unit as

How will you prepare problem statement, How will you prepare problem statem...

How will you prepare problem statement? Problem statement should state what is to be completed and not how it is to be executed. It should be a statement of requirements not a

Give an account of modems used in data transfer, Give an account of modems ...

Give an account of modems used in data transfer. Modem: Modems are usually provided through network operators (Department of Telecommunication in India) or through vendors wh

What is function scope, What is Function scope Function scope: A labe...

What is Function scope Function scope: A label is the only part of identifier that has function scope. A label is declared implicitly by its use in a statement. Label names m

Design a 4 to 1 multiplexer, Design a 4 to 1 Multiplexer by using the three...

Design a 4 to 1 Multiplexer by using the three variable function given by F(A, B, C) = ∑ m(1,3,5,6) Ans. The given function F(A,B,C) = ∑ m(1,3,5,6) can be implemented along wit

Translate the following sentences into predicate logic, Translate the follo...

Translate the following sentences into predicate logic. Give as much structure as possible. Provide a translation key for each predicate letter and individual constant. In your tra

What are the main advantages of sound, Problem: (a) What are the two m...

Problem: (a) What are the two main advantages of sound? (b) UTMDigitlab ltd, specialized in digitizing sound, converts an audio stream of the latest album of Britney Spea

Project, the project database is avilable?

the project database is avilable?

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd