public final class LsOptionSets extends Object
ls
command with the
the following options:
-a | --allFiles | Lists all files in the given directory, including hidden files (those whose names start with \".\" in Unix). By default, these files are excluded from the list. | |||
-h | --humanReadable | Print sizes in human readable format. (e.g., 1K, 234M, 2G, etc.) | |||
-l | --longFormat | Long format, displaying file types, permissions, number of hard links, owner, group, size, date, and filename. | |||
-R | --recurseSubdirs | Recursively lists subdirectories encountered. | |||
-r | --reverseOrder | Reverses the order of the sort to get reverse collating sequence or oldest first. | |||
-t | --timeSorted | Sorts with the primary key being time modified (most recently modified first) and the secondary key being filename in the collating sequence. |
This class serves as entry point to every possible set of ls
options
defined as an enum constant. With this explicit expansion of all possible
option combinations, options can be passed to the command in a very compact
form, such as:
ls(Ls.Options.a, ...); ls(Ls.Options.a.h, ...); ... ls(Ls.Options.a.h.l.R.r.t, ...);
Modifier and Type | Field and Description |
---|---|
LsOptionSet_Rahlrt |
a
Option
"-a" : Lists all files in the given directory, including hidden files
(those whose names start with \".\" in Unix). |
LsOptionSet_Rahlrt |
allFiles
Option
"--allFiles" : Lists all files in the given directory, including hidden files
(those whose names start with \".\" in Unix). |
LsOptionSet_Rahlrt |
h
Option
"-h" : Print sizes in human readable format. |
LsOptionSet_Rahlrt |
humanReadable
Option
"--humanReadable" : Print sizes in human readable format. |
static LsOptionSets |
INSTANCE
The singleton instance.
|
LsOptionSet_Rahlrt |
l
Option
"-l" : Long format, displaying file types, permissions, number of hard
links, owner, group, size, date, and filename. |
LsOptionSet_Rahlrt |
longFormat
Option
"--longFormat" : Long format, displaying file types, permissions, number of hard
links, owner, group, size, date, and filename. |
LsOptionSet_Rahlrt |
r
Option
"-r" : Reverses the order of the sort to get reverse collating sequence or
oldest first. |
LsOptionSet_Rahlrt |
R
Option
"-R" : Recursively lists subdirectories encountered. |
LsOptionSet_Rahlrt |
recurseSubdirs
Option
"--recurseSubdirs" : Recursively lists subdirectories encountered. |
LsOptionSet_Rahlrt |
reverseOrder
Option
"--reverseOrder" : Reverses the order of the sort to get reverse collating sequence or
oldest first. |
LsOptionSet_Rahlrt |
t
Option
"-t" : Sorts with the primary key being time modified (most recently
modified first) and the secondary key being filename in the
collating sequence. |
LsOptionSet_Rahlrt |
timeSorted
Option
"--timeSorted" : Sorts with the primary key being time modified (most recently
modified first) and the secondary key being filename in the
collating sequence. |
Constructor and Description |
---|
LsOptionSets() |
public static final LsOptionSets INSTANCE
public final LsOptionSet_Rahlrt a
"-a"
: Lists all files in the given directory, including hidden files
(those whose names start with \".\" in Unix). By default, these
files are excluded from the list.
The option "-a"
is equivalent to the "--
allFiles
"
option.
public final LsOptionSet_Rahlrt allFiles
"--allFiles"
: Lists all files in the given directory, including hidden files
(those whose names start with \".\" in Unix). By default, these
files are excluded from the list.
The option "--allFiles"
is equivalent to the "-
a
"
option.
public final LsOptionSet_Rahlrt h
"-h"
: Print sizes in human readable format. (e.g., 1K, 234M, 2G, etc.)
The option "-h"
is equivalent to the "--
humanReadable
"
option.
public final LsOptionSet_Rahlrt humanReadable
"--humanReadable"
: Print sizes in human readable format. (e.g., 1K, 234M, 2G, etc.)
The option "--humanReadable"
is equivalent to the "-
h
"
option.
public final LsOptionSet_Rahlrt l
"-l"
: Long format, displaying file types, permissions, number of hard
links, owner, group, size, date, and filename.
The option "-l"
is equivalent to the "--
longFormat
"
option.
public final LsOptionSet_Rahlrt longFormat
"--longFormat"
: Long format, displaying file types, permissions, number of hard
links, owner, group, size, date, and filename.
The option "--longFormat"
is equivalent to the "-
l
"
option.
public final LsOptionSet_Rahlrt R
"-R"
: Recursively lists subdirectories encountered.
The option "-R"
is equivalent to the "--
recurseSubdirs
"
option.
public final LsOptionSet_Rahlrt recurseSubdirs
"--recurseSubdirs"
: Recursively lists subdirectories encountered.
The option "--recurseSubdirs"
is equivalent to the "-
R
"
option.
public final LsOptionSet_Rahlrt r
"-r"
: Reverses the order of the sort to get reverse collating sequence or
oldest first.
The option "-r"
is equivalent to the "--
reverseOrder
"
option.
public final LsOptionSet_Rahlrt reverseOrder
"--reverseOrder"
: Reverses the order of the sort to get reverse collating sequence or
oldest first.
The option "--reverseOrder"
is equivalent to the "-
r
"
option.
public final LsOptionSet_Rahlrt t
"-t"
: Sorts with the primary key being time modified (most recently
modified first) and the secondary key being filename in the
collating sequence.
The option "-t"
is equivalent to the "--
timeSorted
"
option.
public final LsOptionSet_Rahlrt timeSorted
"--timeSorted"
: Sorts with the primary key being time modified (most recently
modified first) and the secondary key being filename in the
collating sequence.
The option "--timeSorted"
is equivalent to the "-
t
"
option.
public LsOptionSets()
Copyright © 2024. All rights reserved.