|
|
There are several different commands you can use to list files. All of these are variations on the ls (list) command.
Two common ways of listing files are ls and lc. ls lists files alphabetically in a single column down your screen:
$ ls /etc
accton
adfmt
asktime
at.mvw
at.sys
atstart.sys
badtrk
brand
checklist
...
lc (list columns) lists files in columns across your screen:
$ lc /etc
accton fd135ds9boot0 logger opasswd tpmd.perms
adfmt fd135ds18boot0 login passwd ttys
...
lf (list files) is another variation on ls.
lf lists files in columns across your screen, marking
programs with a ``'', symbolic links with a ``@''
and directories with a ``/'':
$ lf /etc
accton@ gettydefs@ mkinittab@ siomake@
adfmt@ gettydefs.orig@ mknod@ sioput@
...
If symbolic links are present in a directory, using the
-L option as in the example below identifies the types of
file being referred to by the link. The files would look like this:
$ lf -L /etc
accton* gettydefs mkinittab* siomake*
adfmt* gettydefs.orig mknod* sioput*
...
See
ls(C)
for more information about all the file
listing commands.
Try listing the contents of /bin, a directory where many UNIX commands live:
$cd /bin
$pwd
/bin $lf -L
adb* dc* fsck* mesg* restor* tee* ar* dd* getopt* mkdir* restore* telinit* arV* df* gets* mv* restorL* test* as* diff* grep* ncheck* restorS* time* asm* diff3* grpcheck* newgrp* rm* tmp.spx.si asx* dircmp* hd* nice* rmdir* touch* ... $cd