
NAME

  dkt ls - List files

SYNOPSIS

  dkt ls [<options>] [<arguments>]

DESCRIPTION

The program shows information about the specified files.
Command line options allow to configure which information is shown in which
order.
The size reported for directories includes the size of the directory itself
and the size of all contents.


OPTIONS

-R
	skips all settings from dkt.conf configuration files.

-p <print-order>
	specifies which information to print in which order.
	See PRINT ORDER below.

-r
	lists recursively.

-d
	dereferences symbolic links. Without this option the program shows
	information about the links, if "-d" is used the program shows
	information about the link target.
	When listing recursively the program follows directory symlinks
	if "-d" is used and following the directory symlink is not denied
	by "-l" or "-f".

-l <depth>
	specifies the number of directory symlinks to follow. Specify
	a number or "unlimited".

-f
	stays in the current file system when listing recursively.
	The program does not follow directory symlinks to other filesystems
	and stops on mount points.

-t <types>
	shows information only for the specified file types.
	See FILE TYPES below.

-m <digest.encoding>
	chooses a message digest algorithm and an encoding for checksums.
	The following message digest algorithms can be used:
	MD5		RSA Data Security, Inc. MD5 Message Digest Algorithm
			(RFC 1321)
	SHA-1		SHA-Algorithms
	SHA-224		(FIPS publications)
	SHA-256
	SHA-384
	SHA-512
	RIPEMD-160	Cryptographic hash function by Hans Dobbertin,
			Antoon Bosselaers and Bart Preneel.
	The following encodings can be used to convert the binary message
	digest data to text:
	HEX		Hexadecimal representation
			(creates 2 text bytes for each binary byte).
	ASCII-85	ASCII-85-Encoding
			(creates 5 text bytes for each four binary bytes).
	R-ASCII-85	Reverse ASCII-85-Encoding
			(creates 5 text bytes for each four binary bytes).

-s
	prints a summary.

PRINT ORDER

The argument to the "-p" option can contain the following key characters:

n	File name
s	File size
t	File type
p	File permissions
x	Checksum (message digest converted to text)
l	Number of links
c	Creation timestamp
m	Modification timestamp
a	Access timestamp
u	User ID of owner
g	Group ID of owner group
d	Device number
r	Relative device number
i	Inode number
f	Unique file identifier (device+inode or volume serial + index).
w	Windows reparse point tag (Windows only)

FILE TYPES

The following key characters are used to specify file types:

f	Regular file ("-" is used in output)
d	Directory
l	Symbolic Link (in output "L" is used for symbolic links into another
	file system, "!" is used for symbolic links with non-existing
	targets)
p	Pipe / FIFO
c	Character device
b	Block device
s	Socket
D	Door
e	Event port
O	Xenix special file
N	Xenix semaphore
M	Xenix shared data
C	Multiplexed character device
B	Multiplexed block device
v	VXFS compressed file
n	Network special file
w	Whiteout
a	ACL shadow entry

On Windows information about a reparse point is shown immediately after
the file type in one character:

-	No reparse point attached.
m	Mount point.
l	Symbolic link.
r	Any other reparse point type.

QUOTED FILE NAMES ON WINDOWS

On Windows the backslash is used both as separator between path components
and to escape certain characters in the shell. Enclosing command arguments
(i.e. file names) in double quotes ensures to pass the text pieces as one
string to the command but additionally activates processing of backslash
escape sequences. The table below gives some examples of processing results
(tested on Windows 7 Prof., 2013-07-23):

Typed text		Passed to the command as argument
    C:				C:
    "C:"			C:
    C:\				C:\
    "C:\"			C:"
    C:\\			C:\\
    "C:\\"			C:\

In example 4 we want to specify the root directory of a disk drive, enclosed
in double quotes. Unfortunately the end of the directory name (the backslash)
and the closing quote are recognized as a backslash escape sequence by cmd.exe.
After processing the backslash escape sequence, a double quote is placed in
the argument string.
If you type
  dkt ls "C:\"
cmd.exe provides C:" as file name to the dkt program.
So when using double quotes for file names take care of backslash escape
sequences,
  dkt ls "C:\\"
would be correct here as the result of processing the two backslashes
is one remaining backslash.

RETURN VALUE

The program returns 0 on success, any other value indicates an error.

AUTHOR

Dirk Krause

HISTORY

The "dkt ls" function replaces the kls program from previous dktools versions.

