*/
is a pattern that matches all of the subdirectories in the current directory (*
would match all files and subdirectories; the /
restricts it to directories). Similarly, to list all subdirectories under /home/alice/Documents, use ls -d /home/alice/Documents/*/
More Related Contents:
- How can I get the source directory of a Bash script from within the script itself?
- awk in bash with ls and variable
- How can I get the directory where a Bash script is located from within the script itself?
- How do I get the directory where a Bash script is located from within the script itself?
- List files not matching a pattern?
- Getting the parent of a directory in Bash
- How can I get a recursive full-path listing, one line per file?
- Save file to specific folder with curl command
- How to use Bash to create a folder if it doesn’t already exist?
- How do I tell if a regular file does not exist in Bash?
- How to mount a host directory in a Docker container
- Why equal to operator does not work if it is surrounded by space?
- Set environment variables from file of key/value pairs
- Capturing Groups From a Grep RegEx
- How to avoid bash command substitution to remove the newline character?
- How to access command line arguments of the caller inside a function?
- How to make awk ignore the field delimiter inside double quotes? [duplicate]
- Bash syntax error: “[[: not found” [duplicate]
- Is it possible to build variable names from other variables in bash? [duplicate]
- How to increment version number in a shell script?
- if, elif, else statement issues in Bash
- How do I preserve newlines in a quoted string in Bash? [duplicate]
- Get current directory or folder name (without the full path)
- How do file descriptors work?
- Check if a file is executable
- Pipe output to two different commands [duplicate]
- Using cut command to remove multiple columns
- How to add path with space in Bash variable
- Bash If-statement to check If string is equal to one of several string literals [duplicate]
- How to change a command line argument in Bash?