09-26-2008
Show operating system, current user & network
I have found an excellent OS X pref pane that allows you to output log files or terminal commands/scripts onto the desktop in the background.
What I want to do is create a script that outputs the following...
- Mac OS X Version and Build (As shown in the about this mac)
- Current username
- Current network ports and their associated IP addresses.
- Current machine or hostname
- Attached Volumes
So an example output would be
Mac OS X 10.5.5 Build 9F33
JonDoe
en0 192.168.0.1
en1 192.168.0.2
computer.local <or> computer.mydomain.com
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *111.8 Gi disk0
1: EFI 200.0 Mi disk0s1
2: Apple_HFS Macintosh HD 88.9 Gi disk0s2
3: Microsoft Basic Data WINDOWS 22.6 Gi disk0s3
Could someone help or point me at the right commands and how to output it.
I know diskutil will show me the volumes etc but the rest I am unsure of.
Thanks in advance
9 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I am in the process of reading up on and
learning about linux,and as i read, i am
seeing that it was built off of the unix
system platform,and i also believe that it
is used in the mac computer field,i would
like to know if this is true, and if i should
learn about the macintosh computer... (2 Replies)
Discussion started by: Bill1263
2 Replies
2. UNIX for Dummies Questions & Answers
Hello Everyone,
I'm new to this forum and Unix. I have a couple of questions and please, excuse my ignorance.
I have a spare machine which is now running MS Windows 98 and I would like to format the disk and install the Unix operating system along with Oracle 8i and SQL Server.
My... (13 Replies)
Discussion started by: IronBear
13 Replies
3. UNIX for Dummies Questions & Answers
Dear all,
I plan to take HP-UX cert. EXAM.
But, I cannot find hp-ux system & network administration II.pdf file
Do you know where can I download??
Do you have? can you send to me?
Thank you! (2 Replies)
Discussion started by: hkpcman
2 Replies
4. UNIX for Dummies Questions & Answers
Which is much more powerful as an operating system:
1. Windows 2000
2. Windows 98
3. Windows XP
4. Windows ME
5. Unix
6. Linux
and why is it much more powerful than the other operating systems that i have mentioned.
thanks for your info... (1 Reply)
Discussion started by: alecks1975
1 Replies
5. UNIX for Advanced & Expert Users
I am going to take up a position in Data & Network Security.
I would need to write network shell scripts doing the following task:
Going to around 2000 servers and findout which groups has access to each servers and which ids are there in each group that has access.
I need to implement... (1 Reply)
Discussion started by: pinnacle
1 Replies
6. UNIX for Advanced & Expert Users
Is there a command that display all network info. I'm looking for ip address, subnet mask, gateway, and dns. If there isn't a single command could someone please write me a shellscript that can do this? (8 Replies)
Discussion started by: cokedude
8 Replies
7. UNIX for Advanced & Expert Users
Hello All,
I want to install Linux on my machine, so please tell me one thing which is the best to install-
1.)Red Hat
2.)Cent OS
3.)Red Hat
4.)Ubuntu
5.)Fedora
except that if there is any please tell me. (1 Reply)
Discussion started by: parthmittal2007
1 Replies
8. UNIX for Advanced & Expert Users
Can we know the operating given the IP address or DNS of the host.
All I have is
file://myserver/myapp (4 Replies)
Discussion started by: mohtashims
4 Replies
9. UNIX and Linux Applications
Anyone know anything about "Advanced Plus Operating Environment".
Preferably release 10 Revision 522Gcd probably dated 2003. (4 Replies)
Discussion started by: jgt
4 Replies
LEARN ABOUT SUSE
tgt-setup-lun
tgt-setup-lun(8) System Manager's Manual tgt-setup-lun(8)
NAME
tgt-setup-lun - creates a target, adds a device to the target and defines initiators that can connect to the target
SYNOPSIS
tgt-setup-lun -d device -n target_name [initiator_IP1 initiator_IP2 ...] [-h]
DESCRIPTION
Starts tgtd if necessary and creates a target according to the supplied target_name. The format of the target name is as follows:
iqn.2001-04.com.<hostname>-<target_name> The target name must be unique.
The script then adds the requested device to the target. If specific IP addresses are defined, it adds them to the list of allowed initia-
tors for that target. If no IP addresses is defined, it defines that the target accepts any initiator.
EXAMPLES
Create a target that uses /dev/sdb1 and allows connections only from 192.168.10.81:
tgt-setup-lun -d /dev/sdb1 -n my_target 192.168.10.81
Create a target that uses /dev/sdb1 and allows connections only from 192.168.10.81 and 192.168.10.82:
tgt-setup-lun -d /dev/sdb1 -n my_target 192.168.10.81 192.168.10.82
Create a target that uses /dev/sdb1 and allows connections from any initiator:
tgt-setup-lun -d /dev/sdb1 -n my_target
Display help:
tgt-setup-lun -h
AUTHOR
Written by Erez Zilber
REPORTING BUGS
Report bugs to <erezz@voltaire.com>.
COPYRIGHT
Copyright (C) Voltaire Ltd. 2008.
tgt-setup-lun(8)