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

Name a company that addressed a recent ethical problem in a

Name a company that addressed a recent ethical problem in a positive way. Also, explain how or if this positively affects us as a community?

When it is appropriate to use the trade-off process what

When it is appropriate to use the trade-off process. What conditions apply, and the technical evaluation criteria that might be used?

Need help with a essay with the following phrase for

Need help with a essay with the following phrase for analyzing : " Capitalism is at the heart of how people and organisations are managed in contemporary society" May i ask for a better explanation of the question? Also ...

How could these three tenets of the auburn creed be used to

How could these three tenets of the Auburn Creed be used to motivate others: "I believe that this is a practical word and that I can count only on what I earn. Therefore, I believe in work, hard work." "I believe in educ ...

How can these two tenets of the auburn creed by used in

How can these two tenets of the Auburn Creed by used in addressing teamwork issues: "I believe in honesty and truthfulness, without which I cannot win the respect and confidence of my fellow men." "I believe in the human ...

Discuss the advantages of having and interacting in a

Discuss the advantages of having and interacting in a diverse workplace. Consider the wide range of ideas and perspectives that a range of team members bring to a team, that are of differing ages, ethnic backgrounds and ...

Parmigiano-reggiano global recognition of geographical

Parmigiano-Reggiano: Global Recognition of Geographical Indications What historical factors have helped support the consortium's claims for the geographic specificity of Parmigiano-Reggiano and Parmesan? What are the eco ...

Communication planthis communication plan will be a roadmap

Communication Plan This communication plan will be a roadmap on how the new division will best be able to communicate with Biotech's corporate headquarters, suppliers, other divisions, and internally. This should lay out ...

Discuss strategies to obtain feedback from a customer and

Discuss strategies to obtain feedback from a customer and clients when working in sales.

Describe different networking methods and the advantages

Describe different networking methods and the advantages and disadvantages of them?

  • 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