Question: Create a print _ permissions program that supports the following features. When a file is printed give the numeric value of the permissions, in the
Create a printpermissions program that supports the following features.
When a file is printed give the numeric value of the permissions, in the order of owner group other
Where execute is
Write is
Read is
for example a file named with:
user: rwx
group: r
other:w
Would print:
alpha
if the command line argument v is given:
print your student id and name, then the program exits.
if the command line argument ux is given:
print all files in the next arguement's path that have the owner's execute permission bit set
if the command line argument ur is given:
print all files in the next arguement's path that have the owner's read permission bit set
if the command line argument uw is given:
print all files in the next arguement's path that have the owner's write permission bit set
if the command line argument gx is given:
print all files in the next arguement's path that have the owner group's execute permission bit set
if the command line argument gr is given:
print all files in the next arguement's path that have the owner group's read permission bit set
if the command line argument gw is given:
print all files in the next arguement's path that have the owner group's write permission bit set
if the command line argument ox is given:
print all files in the next arguement's path that have the other's execute permission bit set
if the command line argument or is given:
print all files in the next arguement's path that have the other's read permission bit set
if the command line argument ow is given:
print all files in the next arguement's path that have the other's write permission bit set
If you cannot traverse a directory print: directory skipped
for example:
aout ow
should print all files in the current directory and sub directories that have the other write permission set.
aout ux test
should print all files in the test suddirectory and sub its directories that have the owner execute permission set.
aout gr
should print all files in the root directory and sub directories that have the group read permission set.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
