
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question

Transcribed Image Text:Problem 1:
Write a Bash script that takes the name of a file or directory as an argument,
1. reports if it is a directory or a file, and if the user has read, write and execute permission on
the file or directory, and
2. if it is a file, reports the size of the file and the category of the file based on its size. If the file
size is greater than 1MB (1048576B), the file is a large file; if the file size is less than or equal to
1MB (1048576B) and the file size is greater than 100KB (10240OB), the file is a medium file;
otherwise, it is a small file.
Use a sequence of if statements on the file name or file size to determine the information.
To get the file size, use command du -b and command cut. Read their manual for how to use
them.
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 3 steps with 2 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Create a bash script to manage users. The script will take three script arguments: an input filename of users, a group name, and an operation flag. The input filename of users to manage will be a text file with a list of users to add to the system or remove from the system. Each line in the file will contain a User ID and an encrypted password, which are separated by a space character as a delimiter. Your input user file should have at least five users. You will need to encrypt your passwords via the command line using openssl and place the generated password in your input user file. Write a script that adds and removes users to a Linux system using the input file provided to the script. The users should be added to group provided in the script argument. You will want to check if the group already exists. Use an operation of -a to signify to add the users to the system and an operation of -r to signify removing the users from the system. When adding users, make sure you create the…arrow_forwardTo improve performance when reading files, "block read ahead" can be performed. What is this? A. The operating system determines, when reading block K, if the file is being read sequentially. If it is, the file system will retrieve block K, and initiate the request for block K+1 in the file. B. The operating system determines, when writing block K, if the file is being written sequentially. If it is, the file system will retrieve block K, and initiate the request for block K+1 in the file. C. The operating system determines when reading block K if that block was accessed via a seek. If it is, the file system will retrieve block K, and initiate the request for the next block in the file that is needed by the process. D. All of the abovearrow_forward- Malicious code that must attach itself to another file to replicate itself is known as: - A program that wastefully consumes resources is called a: - Consider the following fragment in an authentication program: code... if date = 5-5-2020 then: crash_operating_system(); code... What type of malicious software is this? -When a security critical process occurs in stages, we may have a: - Not validating the input and its length before attempting to write it to a buffer is:arrow_forward
- FAT32 provides the capability to assign access rights to a file and directory a. True b. Falsearrow_forwardDO NOT COPY FROM OTHER WEBSITES Upvote guarenteed for a correct and detailed answer. Thank you!!!arrow_forwardPS: Please help me to complete the following with the subparts correctly. 1. Develop any java program successfully (any old, submitted program is ok to use) and place it in your GIT repository. a. Steps begin with the installation of GIT repository b. Include snapshots of( at least 3) performed GIT commands in your program c. Provide brief explanation of each command below its snapshotarrow_forward
- This is keeping Linux and C programming in mind, thank you.arrow_forwardWhich of the following statements is true? A)A smaller block size will reduce internal fragmentation associated with file systems. B)A smaller block size will increase external fragmentation associated with file systems. C)A smaller block size will increase internal fragmentation associated with file systems. D)A smaller block size will reduce external fragmentation associated with file systems.arrow_forwarda) Write a bash script (called myname2a.sh) that will produce directories and files Each text files contain its filename without the underscore character. For example: text file Project Manager contains Project Manager). Print screen the bash script you type and runarrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education