Languages
[Edit]
EN

Bash - list files and directories

6 points
Created by:
Root-ssh
178170

In this short article, we would like to show how to list regular files and directories located under indicated path using Bash.

Note: presented solution lets to list visible and hidden files and directories because of .* and * used in the for loop.

print_directory.sh file:

Example output:

Directory structure:

1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join