ls: Add option to list subdirectories recursively

List subdirectories encountered using -R or --recursive flags with ls.
This commit is contained in:
Ariel Don
2021-07-11 11:30:48 -05:00
committed by Ali Mohammad Pur
parent 3289b6a887
commit 4eba921d48
Notes: sideshowbarker 2024-07-18 09:10:47 +09:00
2 changed files with 27 additions and 5 deletions

View File

@@ -31,6 +31,7 @@ If no *path* argument is provided the current working directory is used.
* `-o`, In long format, do not show group information
* `-h`, `--human-readable`: Print human-readable sizes
* `-K`, `--no-hyperlinks`: Disable hyperlinks
* `-R`, `--recursive`: List subdirectories recursively
## Arguments
@@ -43,6 +44,8 @@ If no *path* argument is provided the current working directory is used.
$ ls
# List contents of working directory including hidden dot files
$ ls -la
# List contents of working directory and its subdirectories
$ ls -R
# List contents of /etc/ directory
$ ls /etc
# List contents of /etc/ directory including hidden dot files