Tuesday, August 21, 2012

Alternative of "ls" command


It might happen that you will not be able to access "ls" command. It might not even be accessible from miniroot.

Using echo displays a clean list of files within a given directory.

e.g.
Hard system crashes or drives dying can bring systems down to the point where filesystems are so corrupted that they are unable to mount. When this occurs, at times the only way to see the system files is to use echo for displaying the files and directories.


#cd /usr

#ls *
bin  etc  games  include  java  kerberos  lib  libexec  local  man  nsh  openv
X11R6

- An output of ls can be a single or multiple column listing

#echo *
bin etc games include libexec local man nsh openv sbin share src tmp X11R6

- When echo is used, the files will all be spaced one right after the other.