Index of /~baro/sw/var/coreutils/5.92
      Name                              Last modified       Size  Description

[DIR] Parent Directory 15-Dec-2005 20:52 - [   ] coreutils-5.92.tar.bz2 23-Oct-2005 14:55 4.6M [   ] ls-5.92.select-file-type.patch.gz 30-Oct-2005 23:50 4k

ls -P TYPES
ls --select-file-type=TYPES

   TYPES
     f          regular file
     d          directory
     c          char device
     b          block device
     p          fifo/named pipe
     l          symbolic link
     s          socket
     D		door (solaris)

# NORMAL OUTPUT

# ls testdir/ -l
total 12
-rw-r--r-- 1 baro baro 1654 2005-10-27 17:39 Makefile
brw-r--r-- 1 root root 0, 0 2005-10-27 17:39 test_block
crw-r--r-- 1 root root 0, 0 2005-10-27 17:39 test_char
lrwxrwxrwx 1 root root    9 2005-10-27 17:39 test_deadlink -> test_none
drwxr-xr-x 2 root root 4096 2005-10-27 17:39 test_dir
-rw-r--r-- 1 root root    0 2005-10-27 17:39 test_file
lrwxrwxrwx 1 root root    9 2005-10-27 17:39 test_link -> test_file
lrwxrwxrwx 1 root root   11 2005-10-27 17:39 test_link_to_test_dir -> test_subdir
prw-r--r-- 1 root root    0 2005-10-27 17:39 test_pipe
srwxrwxrwx 1 root root    0 2005-10-27 17:39 test_socket
drwxr-xr-x 3 root root 4096 2005-10-27 17:39 test_subdir

# SELECT ONLY DIRECTORIES, NAMED SOCKETS, BLOCK DEVICES AND CHARACTER DEVICES

# ls testdir/ -l -P sbcd
total 8
brw-r--r-- 1 root root 0, 0 2005-10-27 17:39 test_block
crw-r--r-- 1 root root 0, 0 2005-10-27 17:39 test_char
drwxr-xr-x 2 root root 4096 2005-10-27 17:39 test_dir
srwxrwxrwx 1 root root    0 2005-10-27 17:39 test_socket
drwxr-xr-x 3 root root 4096 2005-10-27 17:39 test_subdir