Not only the recursion depth of find
can be controlled by the -maxdepth
parameter, the depth can also be limited from “top” using the corresponding -mindepth
parameter. So what one actually needs is:
find . -mindepth 1 -type d
More Related Contents:
- Using find to locate files that match one of multiple patterns
- Unix find command, what are the {} and \; for?
- Make xargs handle filenames that contain spaces
- How to delete from a text file, all lines that contain a specific string?
- How to print lines between two patterns, inclusive or exclusive (in sed, AWK or Perl)?
- How to use SSH to run a local shell script on a remote machine?
- Find and replace in file and overwrite file doesn’t work, it empties the file
- What are the uses of the exec command in shell scripts? [closed]
- How can I reverse the order of lines in a file?
- Insert line after match using sed
- Using awk with variables
- How to use ‘-prune’ option of ‘find’ in sh?
- How do I find files that do not contain a given string pattern?
- find: missing argument to -exec
- How to get the second column from command output?
- How do I get the effect and usefulness of “set -e” inside a shell function?
- How to go to each directory and execute a command?
- How to ssh to vagrant without actually running “vagrant ssh”?
- How to check if a process is running inside docker container?
- Make a keybinding to run previous or last shell commands
- How to find all files containing specific text (string) on Linux?
- How to find the largest file in a directory and its subdirectories?
- How do I find the current directory of a batch file, and then use it for the path?
- How do I prevent root access to my docker container
- Which terminal command to get just IP address and nothing else?
- Find all CSV files in a directory using Python
- How to add text at the end of each line in unix
- How to print 5 consecutive lines after a pattern in file using awk [duplicate]
- how do I use the grep –include option for multiple file types?
- Batch convert latin-1 files to utf-8 using iconv