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 Linux

$ ls -d */
Comment

list only directories in bash

ls -d */

# * matches everthing
# / restrics * "everything" to "subdirectories"
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 :: how to update old branch 
Shell :: install docker 
Shell :: update helm repo 
Shell :: undo revert commit 
Shell :: kubectl kubernetes port forward 
Shell :: doxygen install 
Shell :: bash script cheat sheet 
Shell :: apt upgrade full 
Shell :: apache airflow install 
Shell :: gnu octave 
Shell :: uninstall adobe creative cloud 
Shell :: giphy slack 
Shell :: openjdk-17-jdk 
Shell :: df command linux concepts 
Shell :: mirror repository github 
Shell :: GIT: List all currently configured remotes 
Shell :: get total github lines 
Shell :: bash compare numbers 
Shell :: how to control fan speed of ubuntu laptop 
Shell :: common use of python sys library 
Shell :: connection to server at "localhost" (::1), port 5432 failed: Connection refused Is the server running on that host and accepting TCP/IP connections 
Shell :: npm install firebase @angular/fire 
Shell :: Dockerfile RUN cmd before prompt 
Shell :: sudo -s su root in one line 
Shell :: connect to remote redis over tls 
Shell :: unable to open image permission denied 
Shell :: cd n directories back 
Shell :: kylekatarnls/update-helper does not exist and could not be created 
Shell :: linux convert to sha512 
Shell :: odoo 13 install 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =