Skip to main content

Linux Tip - Command Line - How to list just directories


The simplest way of list just directories
ls -d */ 
You can list the directories start with letter b
ls -d b*/ 
Further more list the subdirectories of the directories start with letter b
ls -d b*/*/ 
The outcome will be look like this
 backup/10-5-2007/  backup/lunatic/              bin/gdc/ backup/ccbe/       backup/wplbe/                backup/full/       bin/ffmpeg-0.4.9-p20051216/ 
Bare in mind the command lines above do not list out the hidden directories, to list hidden directories
ls -d .*/
Yes, you can also list with details, and with nice colors.
ls -d .*/ -l

Comments

Popular posts from this blog

Start with flask

1. Install python 2. Python comes with pip. Else install pip 3. pip install Flask 4. Create a file flaskFirst.py from flask import Flask app = Flask(__name__) @app.route('/') def index():     return 'Index Page' 3. Go to the path where the flaskFirst.py is present 4. export FLASK_APP=flaskFirst.py 5. flask run