Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Business Management Expert

Read all of these instructions carefully, as they state some very specific details that will be assumed/expected when grading your answers.

Give the command (single command or pipelined series of commands) that performs each of the following tasks.  Assume bash, and the commands we have been discussing.  Do not use things like perl, awk, python, etc.  Unless specifically stated otherwise, assume that the command should work no matter what your current working directory is or where a user's home directory is located.  Use only flags that are required by the question as stated.  Assume you are logged in as a "normal" (non-administrator) user, but that you have "administrative" permissions set up in the sudoers file in case you would be required to take advantage of that in order to carry out any of these tasks.  Use only single spaces between parts of a command/options/arguments, and do not put extra spaces before or after the answers.

a) Lists all the files and/or directories in the top-level bin directory that have names starting with "ca".  Use a single flag to make this a "long" listing. 

b) Lists all the files and/or directories in the current user's etc directory that have 5-character-long names.  Just a regular listing, not "long", not showing "hidden" files, etc.  

c) Lists all the files and/or directories in the directory one level above the current working directory that have names that start with "a" or "b". 

d) Copies all the files in user turk's NetworkingClass directory to the current working directory of the currently-logged-in user.  Assume permissions are set on turk's NetworkingClass directory to allow you to do this.  Do not recurse into sub-directories.  

e) Copies user turk's NetworkingClass directory, all its files, all its subdirectories, and all files in all its subdirectories, preserving all file permissions, to the ~/MyNetworkingClass directory.  Assume permissions are set on turk's NetworkingClass directory to allow you to do this. 

f) Sets it so that, of permissions that would normally be given for files and/or directories that are created in the future, all permissions will be denied to "other", write and execute permissions will be denied to "group", and no permissions will be denied to the "user" (owner).  

g) Using "absolute" (numeric) notation, changes the permissions on all the existing files in the ~/NetworkingClass/scripts directory so that the "user" (owner) has all permissions, all users in the same group have read and execute permissions, and all other users have only read permissions. 

h) Renames the file "hello.c" which is in the current working directory to be called "hello.cpp".  

i) Moves all files in /usr/local/bin that start with "c", "C", "b", or "B" to /local/bin.  

j) Create a symbolic (soft) link to the existing /bin/vi file from a new file called "editor" in a directory called "etc" in the current user's home directory. 

k) Create a hard link to the current user's ~/.bashrc file from their ~/etc directory.  

l) Sort the output of "ps auxf" so that, in the order specified here, it 1) gets rid of the column header line, 2) sorts alphabetically by user name, thus keeping lines about all processes run by each user together, and 3) sorts secondarily in descending (largest to smallest) order by the numeric process ID. 

m) Counts the number of processes running by each user, as identified by the "ps aux" command, and sorts this output in descending order by count (so the user with the most running processes will be listed first and the user with the least number of running processes will be listed last).  The output should be the number of processes and the user login name for each user running processes.  Ex: 15 turk 

n) Store the count of the number of different users running processes on the system (use data generated by the "ps aux" command) into a variable called "NUM_PROCESS_USERS".  To clarify, don't count the same user multiple times, even if they're logged in more than once.  (Also, don't count the ps aux header line as a user...!)  

o) Display the current date and time, as obtained and formatted with the system "date" command, so that it shows the year, month, day of month, day of week, and time of day, in that order, in formats such as are illustrated here: "2016 04(Apr) 01(Fri) 13:25:55".  Notice the exact spacing, punctuation, capitalization, and zero-prefixing (where needed) to give exactly 2 digits in the month and day of month numbers.  

p) Take the information stored in the system-created USER, PWD, and HOME variables, and display a message formatted as the following, using the information from these three variables: "turk's home directory is '/home/turk'; the current working directory is '/var/log'."  To be clear, this message tells who the logged-in user is, what their home directory is, and what their current working directory is, based on these three variables.  This should work for whoever is logged in, with whatever values are currently in these three variables.  (These are system environment variables and are initialized by the system so you don't need to worry about storing information into them.) 

q) Sort a long file listing ("ls -l") by file size (and secondarily by file name) and store the filename and date and time that the largest file was last updated into a variable called F_NM_DT_TM.  For example, if the file has been changed recently, the results should follow the format illustrated in this example (not including the quotation marks): "Oct 20 06:56 sampleFile2".  If the file had not been changed recently, the results might look like this: "Jan 11 2014 sampleFile1".  

r) Extract the file name from the F_NM_DT_TM variable (see earlier question Q) and store it into a variable called F_NM.  

s) Extract the file month from the F_NM_DT_TM variable (see earlier question Q) and store it into a variable called FE_MO. 

t) Extract file day from the F_NM_DT_TM variable (see earlier question Q) and store it into a variable called F_DY.  

u) Extract file time (or year) from the F_NM_DT_TM variable (see earlier question Q) and store them into a variable called F_TM_YR. 

v) Display a message using the four pieces of information extracted from the F_NM_DT_TM variable (see earlier questions Q, R, S, T, & U) and display a message that reads something like "'lastlog' is the largest file; it was last changed 'Feb 03, 2015'", or "'lastlog' is the largest file; it was last changed 'Nov 03, 14:15:25'", depending on whether it was updated recently or not.  (If it is a recently updated file, it will show the time; if not recently updated it will show the year.)  Of course, it should display information about whatever the largest file is when the command is run, not just the information illustrated here.  Notice the short version of the month name, and the zero-prefixed day number, and the 24-hour time format display.

Business Management, Management Studies

  • Category:- Business Management
  • Reference No.:- M92028936
  • Price:- $30

Priced at Now at $30, Verified Solution

Have any Question?


Related Questions in Business Management

Understanding the importance of international trade in

Understanding the Importance of International Trade in Various Countries Whereas imports and exports in the United States each account for about one-eighth of total annual national income, in some countries the figure is ...

What choices does one have to make when deciding on health

What choices does one have to make when deciding on health care coverage options? What are consumer health care costs in today's market?

It doesnt have to be to detailed just enought to answer the

It doesnt have to be to detailed just enought to answer the questions Your assignment is to assume the role of a market researcher for Toyota. Your company wants to learn more about what type of experience consumers will ...

Make a function first-char that consumes a nonempty string

Make a function first-char that consumes a nonempty string and produces a string consisting of the first character in the original string. Do not use string-ref.

Explain huffman coding to me ie how it works with examples

Explain Huffman Coding to me: i.e. how it works, with examples, in a clean, precise manner.

According to the bureau of labor statistics 71 of the labor

According to the Bureau of Labor Statistics, 7.1% of the labor force was recently unemployed. A random sample of 100 employable adults was selected. Using the normal approximation to the binomial distribution, what is th ...

What are information silos what are the problems caused by

What are information silos? What are the problems caused by information silos? How organizations can solve the problems caused by information silos?

What prevented indentured servants from self-financing

What prevented indentured servants from self-financing their voyage to the colonies instead of paying for the voyage with the labor?

A monopoly faces a demand curve of q 500 - 2p and has

A monopoly faces a demand curve of Q = 500 - 2P and has costs of TC = 100 + 10Q + Q^2 (Thus, you can solve MC = 10 + 2Q). Graphically depict Demand and MC. Also, I would like to know a) What is the profit maximizing leve ...

May regions that voted to stay want to secede from the

May regions that voted to stay want to secede from the UK? What groups of people vote for it or against it and why? What economic effect did it have short-term and recently have on the UK? E.g., on the value of the Briti ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As