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

Network, Give an intuitive explanation of why the maximum throughput, for s...

Give an intuitive explanation of why the maximum throughput, for small beta, is approximately the same for CSMA slotted Aloha and FCFS splitting with CSMA. Show the optimal expecte

State the tips of timescale directive, State the Tips of timescale directiv...

State the Tips of timescale directive Include a `timescale directive at the top of each module, even if there are no delays i n the module, since some simulators may require th

Explain biometric systems, Explain Biometric Systems Biometrics is the ...

Explain Biometric Systems Biometrics is the science of measuring physical properties of living beings. Biometric Authentication (1) Biometric authentication is the aut

What are the graphics adapters, Graphics adapters: Video card converts...

Graphics adapters: Video card converts digital output from computer into an analog video signal and transmits the signal through a cable to monitor also known as a graphics ca

Vector-vector instructions-vector processing, Vector-Vector Instructions ...

Vector-Vector Instructions In this type, vector operands are fetched by the vector register and saved in another vector register. These instructions are indicated with the foll

Explain web service - .net component, Can you give an example of when it wo...

Can you give an example of when it would be appropriate to use a web service as opposed to a non-serviced .NET component? Services which help in stock trading by giving analysi

How is basic authentication worked, How is basic authentication worked? ...

How is basic authentication worked? When an exact resource has been protected using fundamental authentication, Apache sends a 401 Authentication needed header along with the r

Address translation - computer architecture, Address translation: ...

Address translation: Compiler time : If it is known in advance that a program will reside at a particular location of primary memory, and then the compiler can be told to

Name some pure object oriented languages, Some pure object oriented languag...

Some pure object oriented languages are Smalltalk, Eiffel,  Java, Sather.

Basic tradeoff of concerns for instruction set design, Q. Basic Tradeoff of...

Q. Basic Tradeoff of concerns for instruction set design? Basic Tradeoff: Smaller instruction (less space) vs. desire for more powerful instruction repertoire. Generally p

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