ls for files and directories

ls for files and directories

How to use "ls" to list only files or only directories?
ls -la 列出本目录下详细目录和文件信息!
当然你ls --help的帮助是最好的了!
也可以看看这里:
http://www.ourlinux.net/wz/Article_show.php?id=160
ls -l|grep "^-" to list only files.
ls -l|grep "^d" to list only directories