3

What can I do to map ls -l | grep ^d to lsf? I am wading around in the mess of files and folders and trying to just see the folders so it's easier to cd ... around to places.

Zombo
  • 1
  • 62
  • 391
  • 407
SwimBikeRun
  • 4,192
  • 11
  • 49
  • 85

2 Answers2

3

This should do it good sir

alias lsf='ls -l | grep ^d'

to add permanent, do this

echo "alias lsf='ls -l | grep ^d'" >> ~/.bash_profile
Zombo
  • 1
  • 62
  • 391
  • 407
2

If you are using a decent shell (i.e. ZSH) you can do

ls -d *(/)
Michael Wild
  • 24,977
  • 3
  • 43
  • 43