public class UnixHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
VERSION |
static String |
whichCommand
whichCommand = "/usr/bin/which" or /bin/which
|
| Constructor and Description |
|---|
UnixHelper() |
| Modifier and Type | Method and Description |
|---|---|
static String |
getCpCommand()
Gets the absolute path of the cp (Copy) command.
|
static String |
getCustomCommand(String aCommand)
Gets the absolute Pathe to the given custom command.
|
static ArrayList<String> |
getEtcPasswdArray()
Get the lines from /etc/passwd as Array
|
static String |
getRmCommand()
Gets the absolute Pathe to the rm (Remove) Command.
|
static String |
getSuCommand()
Gets the absolute path to the su (SuperUser) command.
|
static String |
getWhichCommand()
Gets the absolute path of the which command.
|
static String |
getYpCatCommand()
Gets the absolute Pathe to the ypcat (YellowPage/NIS Cat) Command.
|
static ArrayList<String> |
getYpPasswdArray()
Get the YelloyPages (NIS) Users lines from
ypcat passwd as Array. |
static boolean |
kdeIsInstalled()
Test if KDE is installed.
|
static void |
main(String[] args)
Standalone Test Main Method call with : > java -cp ..
|
public static String whichCommand
public static final String VERSION
public static ArrayList<String> getEtcPasswdArray()
public static ArrayList<String> getYpPasswdArray()
ypcat passwd as Array. Ypcat
passwd's output has the same format as the the local /etc/passwd. Because there can be
thousands of yp-users and this query is net-based, this is a candidate for a token-based
optimization.public static boolean kdeIsInstalled()
$>/usr/bin/env kwin --version This
assumes that kwin, the window Manager, as part of the kde-base package is already installed.
If this returns with 0 kwin resp. kde means to be installed,public static String getWhichCommand()
public static String getCpCommand()
public static String getSuCommand()
public static String getRmCommand()
public static String getYpCatCommand()
public static String getCustomCommand(String aCommand)
aCommand - a Custom Commandpublic static void main(String[] args)
args - commandline argsCopyright © 2001–2025. All rights reserved.