Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

linux list directories

ls -d */
Comment

get list of directories bash

for d in */ ; do
    echo "$d"
done
Comment

list only directories in bash

ls -d */

# * matches everthing
# / restrics * "everything" to "subdirectories"
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 :: docker fatal: not a git repository (or any of the parent directories): .git 
Shell :: How to replace a string in multiple files in linux command line 
Shell :: how to extract a zip file in linux terminal 
Shell :: install flask ubuntu 20.04 
Shell :: realtek rtl8812au ubuntu 
Shell :: linux command create folder if not exist 
Shell :: stop supervisor service centos 8 
Shell :: styled-components 
Shell :: git remove file from history 
Shell :: compare local branch with remote branch 
Shell :: change default kube editor 
Shell :: wmv to mp4 ffmpeg 
Shell :: ubuntu change directory owner 
Shell :: node check installed modules 
Shell :: python install opencv 
Shell :: upload folder to gitlab 
Shell :: git refusing to merge unrelated histories 
Shell :: linux home dir shortcut 
Shell :: git list all remote branches 
Shell :: linux move folder and subfolders to parent 
Shell :: ubuntu install supervisor 
Shell :: mix ecto.migrate 
Shell :: git bad object refs/heads/ 
Shell :: git update password 
Shell :: heroku rebuild 
Shell :: webmin restart 
Shell :: powershell to string 
Shell :: linux bash command to clean up log files 
Shell :: 7zip command line 
Shell :: httpd https docker 
ADD CONTENT
Topic
Content
Source link
Name
9+3 =