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

  Caselet on michael porter’s value chain management

The assignment in management is a two part assignment dealing 1.Theory of function of management. 2. Operations and Controlling.

  Mountain man brewing company

Mountain Man Brewing, a family owned business where Chris Prangel, the son of the president joins. Due to increase in the preference for light beer drinkers, Chris Prangel wants to introduce light beer version in Mountain Man. An analysis into the la..

  Mountain man brewing company

Mountain Man Brewing, a family owned business where Chris Prangel, the son of the president joins. An analysis into the launch of Mountain Man Light over the present Mountain Man Lager.

  Analysis of the case using the doing ethics technique

Analysis of the case using the Doing Ethics Technique (DET). Analysis of the ethical issue(s) from the perspective of an ICT professional, using the ACS Code of  Conduct and properly relating clauses from the ACS Code of Conduct to the ethical issue.

  Affiliations and partnerships

Affiliations and partnerships are frequently used to reach a larger local audience? Which options stand to avail for the Hotel manager and what problems do these pose.

  Innovation-friendly regulations

What influence (if any) can organizations exercise to encourage ‘innovation-friendly' regulations?

  Effect of regional and corporate cultural issues

Present your findings as a group powerpoint with an audio file. In addition individually write up your own conclusions as to the effects of regional cultural issues on the corporate organisational culture of this multinational company as it conducts ..

  Structure of business plan

This assignment shows a structure of business plan. The task is to write a business plane about a Diet Shop.

  Identify the purposes of different types of organisations

Identify the purposes of different types of organisations.

  Entrepreneur case study for analysis

Entrepreneur Case Study for Analysis. Analyze Robin Wolaner's suitability to be an entrepreneur

  Forecasting and business analysis

This problem requires you to apply your cross-sectional analysis skills to a real cross-sectional data set with the goal of answering a specific research question.

  Educational instructional leadership

Prepare a major handout on the key principles of instructional leadership

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