Changes the permissions on all the existing files

Assignment Help Business Management
Reference no: EM131274214

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.

Reference no: EM131274214

Questions Cloud

Econ 3300a - essay assignment : Students can choose any business and economic policy area such as competition policy, price and entry regulations, international trade policy, environmental policy, policies related to resource development and exploitation, impact of macroeconomic an..
Fog computing same technology or different : Are the Cloud computing and Fog computing same technology or different? what is the difference between them? Please add any reference for this answer
Create a solution that allows a customer to purchase pizzas : Create an object oriented solution that allows a customer to purchase between 1 and 3 pizzas, add toppings to each pizza, if desired, and then displays a receipt and a grand total amount including 6% tax.
Examine health patterns and practices transmitted : Examine health patterns and practices transmitted across generations.
Changes the permissions on all the existing files : 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 al..
Effects of social networking including its benefits : In your opinion and based on your research, submit a post discussing the effects of social networking including its benefits, its negative influences, and how a Christian should deal with the technology?
Minimize the number of gates in design : Design a gate-level circuit that computes the function , where the input X is a 3-bit unsigned number represented by X2X1X0 and the output Y is a 7-bit unsigned number represented by Y6Y5Y4Y3Y2Y1Y0. Minimize the number of gates in your design
Display a summary of all of the movie titles : Display a summary of all of the movie titles, the number of movies entered, and the length of the longest movie. Note: Remember the good design principles you have already learned in the course.
Design a program that has two parallel arrays : Design a program that has 2 parallel arrays: a String array named people that is initalized with the names of seven strangers, and a string array named phonenumbers that is initalized with the seven strangers phonenumbers.

Reviews

Write a Review

Business Management Questions & Answers

  Maintaining minimum inventory levels

Maintaining minimum inventory levels and using pull-through production are important elements h ow does pull-through production help minimize inventories?

  Healthcare articles examination

Describe the three most important aspects (concepts, issues, factual information, etc) of the reading and justify these choices and identify two or more aspects of the reading you don't understand and briefly discuss why these confusing aspects int..

  Gap analysis and business case

Gap analysis and business - DISCUSS EXPECTED BENEFITS OF IMPLEMENTING NEW SYSTEM TO ORTHOSOLUTION AND CONVINCE THEM TO USE IT.

  Universal studios to design a research study

Whom, within the family, would you interview and what kind of questions would you ask?

  Why the discount price is not influenced

If the paperback version sells for $12.95 and 15 hardbacks are in stock, recommend a discount price for the hardcover version. - Explain why the discount price is not influenced by the number of hardcovers in stock.

  Down the level of unemployment

1. Based on the extract above, discuss the caused and the types of unemployment in South Africa. 2. Evaluate how the following changes may affect the rate of unemployment in South Africa?

  Ambiguity and perhaps politicization of definition of merit

Why is the concept of merit itself so important in our society and why is it so much a part of the affirmative action debate?

  Important information about tax policy

Important information about Tax policy - What are the advantages and disadvantages of sales taxes for states

  Difference between deliberate and emergent strategy

1. Compare AND contrast the difference between deliberate and emergent strategy, and give examples when these might occur in organizations.

  Identify the five forces of competition

Assess efforts by this corporation to be a responsible (ethical) corporate citizen and determine the impact these efforts (or lack thereof) have on the company's bottom line. Provide specific examples to support your response.

  Discuss the mathematical formulation

Discuss the mathematical formulation used to simulate all categories of accelerations i.e., zero & non zero both, in any animation.

  Company''s mission statement and competitive advantage

For Part A of your project you will provide a short description of your business, describe the product or service that you plan to market, and identify the company's mission statement and competitive advantage.

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