Answer the question
In order to leave comments, you need to log in
Bash - for and find
Please tell me: (lab assignment)
2. Write a script using a for loop that displays the sizes and permissions for all files in a given directory and all its subdirectories (the directory name is specified by the user as the first command line argument).
How exactly to bind the for loop to the result from find ?
Thanks in advance!
Answer the question
In order to leave comments, you need to log in
#!/usr/bin/env bash
for file in `find $1 -type f`; do
ls -ogh --time-style=+"" $file
done
And why did you ask the question? to solve the problem for you from the university? Drive you in the neck from there.
This resource is not about solving other people's problems. This is a resource about questions and knowledge.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question