03-31-2011
Thanks, but I was looking for 1 command that provided all the detail. I finally found this cmd after some additional research:
pkgcond [-nv] <condition> [ <option(s)> ]
command options:
-n - negate results of condition test
-v - verbose output of condition testing
<condition> may be any one of:
can_add_driver [path]
can_remove_driver [path]
can_update_driver [path]
is_alternative_root [path]
is_boot_environment [path]
is_diskless_client [path]
is_global_zone [path]
is_mounted_miniroot [path]
is_netinstall_image [path]
is_nonglobal_zone [path]
is_path_writable path
is_running_system [path]
is_sparse_root_nonglobal_zone [path]
is_what [path]
is_whole_root_nonglobal_zone [path]
It returns boolean exit codes and also has a verbose mode for additional details
10 More Discussions You Might Find Interesting
1. AIX
I have 2 UNIX boxes and I need to determine whether or not they possess the same tape drive. What is the hardware command to determine what type of tape drive is present? Thx in advance. (4 Replies)
Discussion started by: Surdeymon
4 Replies
2. UNIX for Dummies Questions & Answers
I'm looking for a generic (i.e. would be resident in most/all unix flavors) internal command for determining my OS and version. When I telnet to a box here @ work, I get none of that info and can't remember the equivalent of the DOS ver command; I know I used to know this! Thanks. (2 Replies)
Discussion started by: brian.wilson
2 Replies
3. Shell Programming and Scripting
Hello
i will like to know please how can i determine file type inside perl script
not using the unix "file" program
Thanks allot (1 Reply)
Discussion started by: umen
1 Replies
4. Shell Programming and Scripting
edited and removed (0 Replies)
Discussion started by: mdpalow
0 Replies
5. UNIX for Dummies Questions & Answers
I've tape which I've to use to restore data. The problem is that I don't know what type of backup I have on this type. Can someone help me and tell me how can I determine what type of backup is on the tape?
Thanks for your help. (2 Replies)
Discussion started by: fraydey
2 Replies
6. HP-UX
Good day
I need create new mount points on a server. I'm not very familiar with HP-UX and was given steps on how to go about doing the mounting, etc.
Before I start though, I need to determine which file system type is currently being used. This will determine whether i need to extend the... (3 Replies)
Discussion started by: notreallyhere
3 Replies
7. Shell Programming and Scripting
I have a directory structure with multiple sub directories. Within each directory, there are files without extensions. Is it possible to somehow tell what the file type should be by the file contents?
For example, I opened one of the files using an editor. After scrolling to the end of the... (2 Replies)
Discussion started by: daflore
2 Replies
8. Shell Programming and Scripting
I am limited to using only libraries that come with the default install of ActivePerl. I'd like to be able to determine the content type of a file on the fly. I thought CGI.pm might do it, but it looks a little weird to me from the perldoc. If someone has a quick way to determine the type of... (4 Replies)
Discussion started by: mrwatkin
4 Replies
9. Solaris
Hi Folks,
Just a quick question here, about Legacy Zones. Well more about how to determine if you are actually in one, on logging into a legacy zone - is there a quick way of checking that?
Regards
Gull04 (7 Replies)
Discussion started by: gull04
7 Replies
10. Solaris
I am planning to do solaris 11 global zone patching having solaris 10 branded zone. I have a doubts on step 8 specially
Can someone clear my step 8 doubts or if anything wrong between step 1 to step 9 please correct that also as I have pretty good idea about Step 10 mean patching in solaris 10... (2 Replies)
Discussion started by: amity
2 Replies
LEARN ABOUT OSX
datetime::timezone::local::unix
DateTime::TimeZone::Local::Unix(3) User Contributed Perl Documentation DateTime::TimeZone::Local::Unix(3)
NAME
DateTime::TimeZone::Local::Unix - Determine the local system's time zone on Unix
VERSION
version 1.51
SYNOPSIS
my $tz = DateTime::TimeZone->new( name => 'local' );
my $tz = DateTime::TimeZone::Local->TimeZone();
DESCRIPTION
This module provides methods for determining the local time zone on a Unix platform.
HOW THE TIME ZONE IS DETERMINED
This class tries the following methods of determining the local time zone:
o $ENV{TZ}
It checks $ENV{TZ} for a valid time zone name.
o /etc/localtime
If this file is a symlink to an Olson database time zone file (usually in /usr/share/zoneinfo) then it uses the target file's path name
to determine the time zone name. For example, if the path is /usr/share/zoneinfo/America/Chicago, the time zone is "America/Chicago".
Some systems just copy the relevant file to /etc/localtime instead of making a symlink. In this case, we look in /usr/share/zoneinfo
for a file that has the same size and content as /etc/localtime to determine the local time zone.
o /etc/timezone
If this file exists, it is read and its contents are used as a time zone name.
o /etc/TIMEZONE
If this file exists, it is opened and we look for a line starting like "TZ = ...". If this is found, it should indicate a time zone
name.
o /etc/sysconfig/clock
If this file exists, it is opened and we look for a line starting like "TIMEZONE = ..." or "ZONE = ...". If this is found, it should
indicate a time zone name.
o /etc/default/init
If this file exists, it is opened and we look for a line starting like "TZ=...". If this is found, it should indicate a time zone name.
AUTHOR
Dave Rolsky <autarch@urth.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Dave Rolsky.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
perl v5.16.2 2012-10-17 DateTime::TimeZone::Local::Unix(3)