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

Full form of ldap, LDAP stands for LDAP- Light weight Directory Access...

LDAP stands for LDAP- Light weight Directory Access Protocol.

Define signal and component of obejct oriented modeling, Define about sign...

Define about signal and component of obejct oriented modeling A signal is a specification of an asynchronous stimulus communicated among instances. A component is a physical

What is the linkage section, The linkage section is part of a known as prog...

The linkage section is part of a known as program that 'links' or maps to data items in the calling program are working storage. It is the part of the called program where these sh

What is looping, What is looping Loop is a control structure used to do...

What is looping Loop is a control structure used to do repetitive operation. Some programs include repeating a set of instruction either a particular number of times or until a

Explain about karnaugh maps, Q. Explain about Karnaugh Maps? Karnaugh m...

Q. Explain about Karnaugh Maps? Karnaugh maps are a suitable way of expressing and simplifying Boolean function of 2 to 6 variables. The stepwise process for Karnaugh map is.

Explain the paging unit, Explain the Paging Unit Paging mechanism funct...

Explain the Paging Unit Paging mechanism functions with 4K - byte memory pages or with a new extension available to Pentium with 4M byte-memory pages. In Pentium, with new 4M-b

What is the gray equivalent of decimal number 25, What is the Gray equivale...

What is the Gray equivalent of  (25) 10 Ans. Gray equivalent of (25) 10 : The Decimal number 25 has binary equivalent as (00100101) 2 The left most bits (MSB) into gray

Explain implementation of circuits from boolean expression, Explain Impleme...

Explain Implementation of the Circuits From the Boolean Expression? If the operation of the circuit is defined by a Boolean expression, a logic-circuit diagram can he implement

Poor human support - obstacle to information system, Poor human support - O...

Poor human support - Obstacle to Information System The full utility of an IS will only be realised if it is properly supported by the users. Technology is never a solution in

What is compact disk recordable, Q. What is Compact Disk Recordable? To...

Q. What is Compact Disk Recordable? To accommodate applications in which just one or a small number of copies of a set data is required write-once read-many CD called as CD Rec

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