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

Define parity bit and list its types, Define parity bit and List its types....

Define parity bit and List its types. The most common error detection code used is the parity bit. Parity bit is a extra bit contained with a binary message to make the total n

Determine the quivalence partitioning, Determine the quivalence Partitionin...

Determine the quivalence Partitioning? The division of domain data into dissimilar equivalence data classes is performed using Equivalence Partitioning. It is executed for redu

Write short note on digital audio segments, Problem: a) Authoring tools...

Problem: a) Authoring tools consist of two basic features. First, an authoring facility for creating and editing, and second, a presentation vehicle for delivery. The authorin

Define the analysis that determines the meaning of statement, Analysis whic...

Analysis which determines the meaning of a statement once its grammatical structure becomes known is termed as? Ans. The meaning of a statement when its grammatical structure b

Define syntax of mpi_scan function, Q. Define syntax of MPI_Scan  function...

Q. Define syntax of MPI_Scan  function? MPI_Scan (Sendaddr,, Receiveaddr , count, datatype, op, comm): It merges the partial values in p final results that are received in

Describe the role of software developers, Describe the role of Software dev...

Describe the role of Software developers Software developers have wide experience of tackling such issues. Students who develop software project spending days and nights strug

Write a program to check give word is a palindrom or not, Write a program t...

Write a program to check whether a given word is a palindrome or not? # include # include void main() { char word[10]; int length=0,mid,count=0; clrscr();

Define syntax of mpi_scatter function, Q. Define syntax of MPI_Scatter func...

Q. Define syntax of MPI_Scatter function? MPI_Scatter(Sendaddr, Scount, Sdatatype, Receiveaddr, Rcount, Rdatatype, Rank, Comm): 'Using this function process with rank' ran

Elucidate in brief the functions of the clock generator chip, Elucidate in ...

Elucidate in brief the functions of the clock generator chip, 8284. 8284 Clock generator: 8284 is an ancillary component to the microprocessors. Without clock generator, many

What are the different types of computer networks, Q. Mention different cla...

Q. Mention different classes of computer networks (on the basis of scale) and distinguish one from the other. Ans: Local Area Network (LAN) Metropolitan Area Netw

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