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

What is macro, A series of keystrokes and mouse clicks that can be abbrevia...

A series of keystrokes and mouse clicks that can be abbreviated into a one keystroke or mouse click.

Design a sequential circuit with two flip-flop and one input, Design a coun...

Design a counter modulo 4 (sequential circuit with two flip-flops and one input U) which work like that: 1. When U=0, the state of the flip-flop does not change. 2. Whe

Sigmoid units-artificial intelligence, Sigmoid units - Artificial intellige...

Sigmoid units - Artificial intelligence Remember that the function inside units take as input the weighted sum, S, of the values coming from the units associated to it. The fun

What are the end-to-end layers of osi structure, What are the end-to-end la...

What are the end-to-end layers of OSI structure? The layers 4 to 7 of ISO-OSI reference model communicate along with peer entities into the end systems. Now here is no communi

Show SNMPs representation in ASN.1 syntax, An SNMP integer whose value is 2...

An SNMP integer whose value is 200 has to be transmitted. Show its representation in ASN.1 syntax. An ASN.1 transfer syntax describes how values of ASN.1 types are unambiguousl

What is a manifest, What is a Manifest?  An assembly manifest contains...

What is a Manifest?  An assembly manifest contains all the metadata required to specify the assembly's version requirements and security identity, and all metadata required to

What are the principles of transport layer, Q. What are the principles of t...

Q. What are the principles of transport layer? Transport layer: This layer is the first end-to-end layer. Header of transport layer includes information which helps send the

Data type, Define data type and abstract data type comment upon the signifi...

Define data type and abstract data type comment upon the significant of both

Explain about two-pass assembler, Q. Explain about Two-pass assembler? ...

Q. Explain about Two-pass assembler? Assemblers usually make two or more passes through a source program in order to resolve forward references in a program. A forward referenc

What will be the result of adding hexadecimal A6 to 3A, The result of addin...

The result of adding hexadecimal number A6 to 3A is ? Ans. The result will be E0.

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