Tom Heston

Dedicated to Your Good Health !

UNIX Tutorial: ls (list contents of working directory)

without comments

General format for the ls (list) command. Note “l” = lower case “L”

% ls [options] [directory]

List the contents of the working directory, short version

% ls

List the contents of the working directory, long version (with details)

% ls -l

List files, including files that are normally hidden

% ls -a

List files for the directory “/usr/sbin” in long format

% ls -l /usr/sbin

List files sorted by modification time

% ls -t

List files sorted by modification time, reverse order

% ls -tr

List files, one file per line

% ls -1

List files in long format, using human readable file sizes

% ls -lh

Some useful examples are found at http://www.thegeekstuff.com/2009/07/linux-ls-command-examples/

Written by Tom

December 29th, 2009 at 5:47 pm

Posted in Computers,Unix

Tagged with , ,

Leave a Reply