UNIX Tutorial: ls (list contents of working directory)
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/
No Comments
No comments yet.
RSS feed for comments on this post. TrackBack URI
Leave a comment
You must be logged in to post a comment.