|→||1.5 File and directory tools|
List files, configurable output column order
|File type and permissions output on non-Windows systems|
|File type and attributes output on Windows systems|
|Quoted file names on Windows systems|
|Copyright and license|
dk-ls [options] [files]
The dk-ls program shows information about files. There are some differences to traditional ``ls'' or ``dir'' programs:
For symbolic links the link target is shown if `n' is the final character in the print order string.
|N||Name, do not show symbolic link target|
|p||Permissions (attributes on Windows systems)|
|u||User ID of file owner (not on Windows systems)|
|g||Group ID owning the file (not on Windows systems)|
|a||Last access timestamp|
|l||Number of links|
|d||Device number (volume serial number on Windows systems)|
|r||Relative device number (volume serial number on Windows systems)|
|i||Inode number (file index on Windows systems)|
|w||Windows reparse point tag value (only on Windows systems)|
|x||Message digest (checksum)|
|-||Not a symbolic link|
|l||Symbolic link pointing into the same file system|
|L||Symbolink link pointing outside file system|
|!||Dangling link (target does not exist)|
|c||Character special device|
|b||Block special device|
|C||Multiplexed character special device|
|B||Multiplexed block special device|
|D||Name service door|
|o||Xenix special file|
|m||Xenix shared data|
|v||VXFS compressed file|
|n||Network special file|
|a||ACL shadow entry|
Short summary: Permissions are shown in the same notation as ``ls -l'' does.
The output consists of 3 groups: Permissions for file owner user, file owner group and other persons. Each group consists of 3 characters indicating read, write, and execute permission.
If the set user ID bit is set, the execution permission
character for the user is changed from `x' to `s' or from `-' to
If the set group ID bit is set, the execution permission character for the group is changed from `x' to `s' or from `-' to `S'.
If the restricted deletion flag or sticky bit is set, the execution permission character for others is changed from `x' to `t' or from `-' to `T'.
|Reparse point character|
|-||Not a reparse point|
|w||Mounted WIM image|
|s||SIS reparse point|
|n||NFS reparse point|
|c||CSV reparse point|
|d||DFS reparse point|
|f||DFSR reparse point|
|u||Deduplication reparse point|
|h||HSM reparse point|
|2||HSM2 reparse point|
|r||Other reparse point|
|File type character|
|R||read-only attribute set|
|-||read-only attribute not set|
|S||system attribute set|
|-||read-only attribute not set|
|H||hidden attribute set|
|-||hidden attribute not set|
|I||not indexed attribute set|
|-||not indexed attribute not set|
|C||compressed attribute set|
|-||compressed attribute not set|
|E||encrypted attribute set|
|-||encrypted attribute not set|
|O||offline attribute set|
|-||offline attribute not set|
|P||sparse attribute set|
|-||sparse attribute not set|
|T||temporary attribute set|
|-||temporary attribute not set|
|V||virtual attribute set|
|-||virtual attribute not set|
0 on success, all other values indicate errors.
dk-ls -r -tf -pmtn | dk-sort
dk-ls -r -tf -pstn | dk-sort -u
dk-ls -r -td -pstn | dk-sort -u
dk-ls -tf -psn | dk-sort -u -t -s 1
dk-ls -tf -pmn | dk-sort -t -s 2
A sequence of question marks is printed if the program fails to obtain device number, volume serial number, inode number, or file index number.
A single question mark is printed if the program fails to obtain number of links, file owner UID, or file owner GID.
A sequence of `x' characters is printed if a message digest is requested for anything else than a regular file or if the program failed to read the file.
On Windows the file name length is restricted to _MAX_PATH (260) characters if the file name contains a wildcard (* or ? character).
On Windows systems user management and file permission concepts differ significantly from the concepts on Linux and Unix systems. The characters `u' and `g' in the print order specification have no effect.
On Windows systems there are different functions available to obtain information about files. Sometimes a function delivering less information succeeds for files where the default function delivering more information fails (i.e. when non-privileged processes ask for information about c:\pagefile.sys). In such situations we can not print volume serial number, file index or number of links. Question marks are shown instead.
On non-Windows systems there is no reparse point tag, so a `w' in the print order specification has no effect.
This program uses DK libraries version 4.
On Windows systems the backslash is used for two purposes:
Quotes are used around text containing spaces to pass the entire text as one argument to a command. Unfortunately quoting also activates processing of backslashes as start of escape sequences.
in the shell
|Text passed as argument
to a command
in the shell
In the fourth example 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, as a result backslash
escape sequence processing a double quote is passed to the
So if you type
cmd.exe provides C:" as file name to dk-ls. When using double quotes for file names, take care of backslash escape sequence processing,
would be the correct command here.
The program was named ``kls'' in version 2.x.x, ``dkt ls'' in 3.x.x.
See the Legal stuff page for copyright and license information.
This product includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit (http://www.openssl.org/).
This product includes cryptographic software written by Eric Young (firstname.lastname@example.org).
This product includes software written by Tim Hudson (email@example.com).
|http://dktools.sourceforge.net||DK tools home page|