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.
Asked
Active
Viewed 196 times
3
Zombo
- 1
- 55
- 342
- 375
SwimBikeRun
- 3,802
- 10
- 47
- 81
2 Answers
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
- 55
- 342
- 375
2
If you are using a decent shell (i.e. ZSH) you can do
ls -d *(/)
Michael Wild
- 23,541
- 3
- 40
- 40
-
Any shell regardless of decentness can handle `echo */` and be done with the problem. – Ruslan Aug 24 '18 at 19:02