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

An example of load-store optimization using expression trees, Give LOAD-STO...

Give LOAD-STORE optimization based on expression trees for the expression (A+B)/(C-D). LOAD-STORE optimization based on expression trees for the expression (A+B)/(C-D) is given

Cso, why we don''t use register at the place of ram?

why we don''t use register at the place of ram?

Design new registration system, WestEast College hires you as a systems ana...

WestEast College hires you as a systems analyst to design its new admission/registration system. WestEast College is one of the top ranked schools in the United States. It is a

Find minimum sampling rate of analog signal to be sampled, The analog signa...

The analog signal needs to be sampled at a minimum sampling rate of: (A) 2fs                                               (B) 1/(2fs) (C)  fs/2

What are the features of client/server computing, What are the features of ...

What are the features of Client/Server Computing? Although there are several different configurations, different hardware and software platforms and even dissimilar network pro

Java, what is java?

what is java?

Why process scheduling algorithm favour i/o bound processes, Suppose that a...

Suppose that a process scheduling algorithm favors those processes that have used the least processor time in the recent past. Why will this algorithm favour I/O- bound processes,

Anti reflection coating, expression for thickness and refractive index of c...

expression for thickness and refractive index of coating material to act as anti reflection coating

Name the approaches used for generating the control signals, What are the t...

What are the two approaches used for generating the control signals in proper sequence? Hardwired control Micro programmed control

Learning weights in perceptrons, Learning Weights in Perceptrons: Furt...

Learning Weights in Perceptrons: Furthermore details are we will look at the learning method for weights in multi-layer networks next lecture. Thus the following description o

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