Dec 192017
 
Brings UNIX ls command (DIR) to MSDOS. C source.
File LS.ZIP from The Programmer’s Corner in
Category C Source Code
Brings UNIX ls command (DIR) to MSDOS. C source.
File Name File Size Zip Size Zip Type
LS.C 23101 6037 deflated
LS.DOC 1918 974 deflated
LS.EXE 19086 11060 deflated

Download File LS.ZIP Here

Contents of the LS.DOC file


From: sweet%[email protected] (Kevin Sweet)

This is a public domain implementation of the `ls' routine command
similar to the one available under 4.xBSD.

It was written by Kevin Sweet and released to the public domain 1988.
(This manual by Rahul Dhesi, obtained by slightly revising the
electronic message that accompanied this software.)

This software was written using the Turbo C v1.5(c) compiler under
MS-DOS v3.3(c). The syntax is nearly identical with that found on UNIX
systems with the exception that options that do not apply in an MSDOS
environment are not supported, directory entry sizes are not reported,
and three new options have been added (PSZ). In addition, two compile
time options exist (SIZE_CL, DOT_AL-- see comment in source code).

compile with: tcc -ms -f- -Z -O -G -k -N ls


ls - list the contents of a directory in alphabetical order

usage:ls [-1CFPRSZadflrst] name ...

options:
-1list in one column format
-Clist in multi-column format (default)
-Fdirectories are marked with a trailing '\', system files are marked
with a trailing '@' and executable files are marked with a trailing '*'
-Pprint the directory name before listing
-Rrecursively list subdirectories
-Ssort by file size in bytes (cluster size if option 's' is selected)
-Zlist full pathnames in one column for input to Zoo
-alist all entries including hidden and system files
-dlist directories as if they were a normal file
-fdo not sort (list in the order files appear in the directory)
-llist in long format ([size in clusters,] mode, size, date, name)
-rreverse the order of the selected sort
-slist the file size in clusters
-tsort by time

ls parses the environment variable LS for options before parsing the
command line. Options may be turned off with a trailing '-' (e.g.
"ls -1F-s" turns on the '1' and 's' options and turns off the 'F'
option).


 December 19, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)