Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

list only directories

# List directories under the current working directory.
ls -l | grep "^d"

# List directories under the current working directory and 
# include hidden folders
ls -la | grep "^d"
Comment

linux list directories

ls -d */
Comment

List only directories in Linux

$ ls -d */
Comment

list only directories in bash

ls -d */

# * matches everthing
# / restrics * "everything" to "subdirectories"
Comment

find only list directories

find . -maxdepth 1 -type d -iname "<regex>" -printf '%f
'
Comment

bash find only list directories

find . -type d -iname "<your regex>" -printf '%f
'
Comment

list directories linux

# Linux shell command that lists directory contents of files and directories

ls -a	list all files including hidden file starting with '.'
ls --color	colored list [=always/never/auto]
ls -d	list directories - with ' */'
ls -F	add one char of */=>@| to enteries
ls -i	list file's inode index number
ls -l	list with long format - show permissions
ls -la	list long format including hidden files
ls -lh	list long format with readable file size
ls -ls	list with long format with file size
ls -r	list in reverse order
ls -R	list recursively directory tree
ls -s	list file size
ls -S	sort by file size
ls -t	sort by time & date
ls -X	sort by extension name
Comment

PREVIOUS NEXT
Code Example
Shell :: check ssh connection history linux 
Shell :: Finding Apache http Process 
Shell :: how to update linux 
Shell :: powershell run bat file 
Shell :: git clone with folder name 
Shell :: navigate to folder macq 
Shell :: linux custom command 
Shell :: how to undo a commit sent that was pushed 
Shell :: check my privilages ubuntu 
Shell :: edit crontab daily 
Shell :: command to install express graphql 
Shell :: ubuntu packages 
Shell :: how to logout in linux kali 
Shell :: bash rm all except 
Shell :: git view differences between commits 
Shell :: Cask adoptopenjdk8 exists in multiple taps: 
Shell :: ZSH Configuration File (.zshrc) 
Shell :: use touch id to sudo 
Shell :: install samba server ubuntu 22.04 
Shell :: Install-Package MailKit 
Shell :: superclass mismatch for class Command 
Shell :: git clone with subrepos 
Shell :: powershell count lines of code 
Shell :: switch installed linx to wsl2 
Shell :: stop nginx server 
Shell :: brew install macos 
Shell :: git commit not showing up in github 
Shell :: install pip linux 
Shell :: install windows app powershell 
Shell :: how to change permissions for only the root 
ADD CONTENT
Topic
Content
Source link
Name
6+9 =