Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a PERL program that accepts a directory name on the command line. The program checks that there is exactly one command line argument, then

Write a PERL program that accepts a directory name on the command line.

The program checks that there is exactly one command line argument, then calls a sub. The sub finds all files in the directory that have 700 access permission (the owner has full permission, group and other users have no permission), and changes the access rights for these files so that everyone else can read the file (744 permission). The sub then prints the name and new access rights of all the changed files.

Sample output:

$ ls -l dir1 total 5 -rw-rw-rw- 1 ucn2140 staff 1970 Mar 3 16:24 lab3 -rw-rw-rw- 1 ucn2140 staff 298 Mar 3 16:24 lab3.soln1 -rw-rw-rw- 1 ucn2140 staff 306 Mar 3 16:24 lab3.soln2 -rwx------ 1 ucn2140 staff 553 Mar 3 17:21 lab4.soln1 -rwx------ 1 ucn2140 staff 180 Mar 3 17:21 lab4.soln2 $ lab6.soln2 dir1 dir1/lab4.soln1 744 dir1/lab4.soln2 744 $ lab6.soln2 Usage: lab6.soln2 dirname 

Turn in directory listings before and after your program runs, as well as the perl code and results.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning Databases With PostgreSQL From Novice To Professional

Authors: Richard Stones, Neil Matthew

2nd Edition

1590594789, 978-1590594780

More Books

Students also viewed these Databases questions

Question

Discuss the steps you should take if your identity is stolen.

Answered: 1 week ago

Question

2 The main characteristics of the market system.

Answered: 1 week ago

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago