Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6057401
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:29:04+00:00 2026-05-23T08:29:04+00:00

This is one of my homework exercise. Write a shell program, which will take

  • 0

This is one of my homework exercise.

 Write a shell program, which will take a directory as an argument. 
The script should then print all the regular files in the directory and all 
the recursive directories, with the following information n the given order for 
each of the files 

File name (full name from the specified directory)     file size    owner 

In case the directory argument is not given, the script should assume the 
directory to be the current working directory 

I am confused about how to approach this problem. For the listing of files part, I tried

ls -R | awk ...

but i was not able to do it because I was not able to find a suitable field seperator for awk.
I know its unfair to ask for a solution, but please can you guys give me a hint as how to proceed with the problem? Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T08:29:05+00:00Added an answer on May 23, 2026 at 8:29 am

    You really don’t want to use ls and awk for this. Instead you want to check the documentation for find to figure out what string to put in the following script:

    find ${1:-.} -type f -printf "format-string-to-be-determined-by-reader\n"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This one will take some explaining. What I've done is create a specific custom
I have a prolog homework, which should work like this: singles([1,2,3,2,2,4,1], [3,4]). true Now
This one is a case of not doing your homework.:-) Apart from dynamic loading
I got this exercise, is not a homework , I just trying to solve:
this one is not homework, it just the fact that i've been out of
This is homework, and this questions Extends this one So there is a button
I want to use a temp directory that will be unique to this build.
yes this is one of my homework projects - to implement a Circular Linked
Hey this is one of the classes that I had for homework in my
This is pseudo homework (it's extra credit). I've got a BST which is an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.