Your Ad Here

Kamis, 21 April 2011

Unix Tip: ANOTHER GET YOUR IP ADDRESS

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

UNIX GURU UNIVERSE
UNIX HOT TIP

Unix Tip 3359 - April 21, 2011

http://www.ugu.com/sui/ugu/show?tip.today

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


ANOTHER GET YOUR IP ADDRESS

A previous tip listed how
to get the IP address for your
system using the output from
ifconfig. However the output
from ifconfig is different
across systems.

For Solaris use:

ifconfig -a | grep "inet" | grep -v "127.0.0.1" | awk '{print $2;}'

For HP-UX use:

ifconfig foo | grep "inet" | awk '{print $2;}'

Where foo is the interface, generally lan0, lan1 etc.


This tip generously supported by: gromano@staterail.nsw.gov.au


--------------------------------------------------------------------------
To Subscribe: http://www.ugu.com/sui/ugu/show?tip.subscribe
To Unsubscribe: http://www.ugu.com/sui/ugu/show?tip.unsubscribe
To Submit A Tip: http://www.ugu.com/sui/ugu/show?tip.today

==========================================================================
DISCLAIMER: All UNIX HOT TIPS ARE OWNED BY THE UNIX GURU UNIVERSE AND ARE
NOT TO BE SOLD, PRINTED OR USED WITHOUT THE WRITTEN CONSENT OF THE UNIX
GURU UNIVERSE. ALL TIPS ARE "USE AT YOUR OWN RISK". UGU ADVISES THAT
ALL TIPS BE TESTED IN A NON-PRODUCTION DEVELOPMENT ENVIRONMENT FIRST.

Unix Guru Universe - www.ugu.com - tips@ugu.com - Copyright 1994-2001
==========================================================================

Rabu, 20 April 2011

Unix Tip: WATCH THOSE VENDORS

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

UNIX GURU UNIVERSE
UNIX HOT TIP

Unix Tip 3358 - April 20, 2011

http://www.ugu.com/sui/ugu/show?tip.today

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


WATCH THOSE VENDORS

Need to monitor what a vendor
is doing when they access your
command line? Don't have access
to programs such as peek? Use
the unix command script.

Into the vendors .profile or
.login build a line that states
script <filename> i.e. script
vendorlog, you may place it in a
secure directory if you wish by
entering the full pathname of
the file.

Now when the vendor logs in, the
file will show you what commands
they entered. If you want to
monitor in real time, simply use
tail -f <filename> to see the
characters as they are typed.
The vendor will see an output of
script started, but it's your
machine, you make the rules
regarding access.

Remember that you normally enter
exit on your terminal window to
stop logging to a file. This
means if the vendor types exit,
the script command stops. Also,
running the script again with the
same file name will overwrite what
was previously logged unless you
use script -a. See man page for
additional information.


This tip generously supported by:
mike.hammernik@msg.ameritech.com


--------------------------------------------------------------------------
To Subscribe: http://www.ugu.com/sui/ugu/show?tip.subscribe
To Unsubscribe: http://www.ugu.com/sui/ugu/show?tip.unsubscribe
To Submit A Tip: http://www.ugu.com/sui/ugu/show?tip.today

==========================================================================
DISCLAIMER: All UNIX HOT TIPS ARE OWNED BY THE UNIX GURU UNIVERSE AND ARE
NOT TO BE SOLD, PRINTED OR USED WITHOUT THE WRITTEN CONSENT OF THE UNIX
GURU UNIVERSE. ALL TIPS ARE "USE AT YOUR OWN RISK". UGU ADVISES THAT
ALL TIPS BE TESTED IN A NON-PRODUCTION DEVELOPMENT ENVIRONMENT FIRST.

Unix Guru Universe - www.ugu.com - tips@ugu.com - Copyright 1994-2001
==========================================================================

Selasa, 19 April 2011

Unix Tip: SHELL PROMPT CONTROL

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

UNIX GURU UNIVERSE
UNIX HOT TIP

Unix Tip 3357 - April 19, 2011

http://www.ugu.com/sui/ugu/show?tip.today

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


SHELL PROMPT CONTROL

Shell prompts to identify
system and logged in users.

The entries can be made in
the /etc/profiles file that
TELNET and interactive terminal
logins use.

If your SHELL=/bin/sh
#for example SOLARIS

PS1="`hostname1{$LOGNAME} "

If your SHELL=/bin/bash
# for example Linux

PS1='\h:\w\$ '

If your SHELL=/bin/zsh

PS1="%m"%~%# "

The details of environment
variable assignments are usually
documented in the man pages for
the shell being used.

You may wish to test the
substitutions by spawning a
subshell (issuing the sh, bash,
zsh, ksh, ash or other shell
command), then perform the
environment variable substitution
assignments and see what happens.
When you are satisfied with the
results, then place appropriate
entries in the /etc/profile or
startup script for your favorite shell program.

This tip generously supported by:
Steven.J.Hathaway@state.or.us

--------------------------------------------------------------------------
To Subscribe: http://www.ugu.com/sui/ugu/show?tip.subscribe
To Unsubscribe: http://www.ugu.com/sui/ugu/show?tip.unsubscribe
To Submit A Tip: http://www.ugu.com/sui/ugu/show?tip.today

==========================================================================
DISCLAIMER: All UNIX HOT TIPS ARE OWNED BY THE UNIX GURU UNIVERSE AND ARE
NOT TO BE SOLD, PRINTED OR USED WITHOUT THE WRITTEN CONSENT OF THE UNIX
GURU UNIVERSE. ALL TIPS ARE "USE AT YOUR OWN RISK". UGU ADVISES THAT
ALL TIPS BE TESTED IN A NON-PRODUCTION DEVELOPMENT ENVIRONMENT FIRST.

Unix Guru Universe - www.ugu.com - tips@ugu.com - Copyright 1994-2001
==========================================================================

Senin, 18 April 2011

Unix Tip: SOLARIS PROCESSOR COUNT

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

UNIX GURU UNIVERSE
UNIX HOT TIP

Unix Tip 3356 - April 18, 2011

http://www.ugu.com/sui/ugu/show?tip.today

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


SOLARIS PROCESSOR COUNT

Ever needed to know how many
processors you have and what
speed their running at on
your Solaris system?

Just run the command "prtdiag"
from the directory
/usr/platform/sun4u/sbin. Add
a "-v" for even more info about
power supply and power/cpu fans.

This tip generously supported by: litz2@home.com


--------------------------------------------------------------------------
To Subscribe: http://www.ugu.com/sui/ugu/show?tip.subscribe
To Unsubscribe: http://www.ugu.com/sui/ugu/show?tip.unsubscribe
To Submit A Tip: http://www.ugu.com/sui/ugu/show?tip.today

==========================================================================
DISCLAIMER: All UNIX HOT TIPS ARE OWNED BY THE UNIX GURU UNIVERSE AND ARE
NOT TO BE SOLD, PRINTED OR USED WITHOUT THE WRITTEN CONSENT OF THE UNIX
GURU UNIVERSE. ALL TIPS ARE "USE AT YOUR OWN RISK". UGU ADVISES THAT
ALL TIPS BE TESTED IN A NON-PRODUCTION DEVELOPMENT ENVIRONMENT FIRST.

Unix Guru Universe - www.ugu.com - tips@ugu.com - Copyright 1994-2001
==========================================================================

Minggu, 17 April 2011

Unix Tip: MOVING FILES WITH CPIO

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

UNIX GURU UNIVERSE
UNIX HOT TIP

Unix Tip 3355 - April 17, 2011

http://www.ugu.com/sui/ugu/show?tip.today

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


MOVING FILES WITH CPIO

If you have a multitude of
files to move from one
directory or filesystem to
another, here's a one liner:

# find /old_directory -depth | cpio -pdmv /new_directory

This will move all of the
files under the specified
old_directory to the
new_directory, keeping the
same ownership, permissions,
and directory structure.


This tip generously supported by: BAtkins@osc.uscg.mil


--------------------------------------------------------------------------
To Subscribe: http://www.ugu.com/sui/ugu/show?tip.subscribe
To Unsubscribe: http://www.ugu.com/sui/ugu/show?tip.unsubscribe
To Submit A Tip: http://www.ugu.com/sui/ugu/show?tip.today

==========================================================================
DISCLAIMER: All UNIX HOT TIPS ARE OWNED BY THE UNIX GURU UNIVERSE AND ARE
NOT TO BE SOLD, PRINTED OR USED WITHOUT THE WRITTEN CONSENT OF THE UNIX
GURU UNIVERSE. ALL TIPS ARE "USE AT YOUR OWN RISK". UGU ADVISES THAT
ALL TIPS BE TESTED IN A NON-PRODUCTION DEVELOPMENT ENVIRONMENT FIRST.

Unix Guru Universe - www.ugu.com - tips@ugu.com - Copyright 1994-2001
==========================================================================

Sabtu, 16 April 2011

Unix Tip: CHECKI FOR FULL FILESYSTEMS

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

UNIX GURU UNIVERSE
UNIX HOT TIP

Unix Tip 3354 - April 16, 2011

http://www.ugu.com/sui/ugu/show?tip.today

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


CHECKI FOR FULL FILESYSTEMS

Many times we have a file
systems which is too full.
To quickly find out which
are the large files in there
we could use:

find / -xdev -size +1024 -ls | sort -r +b

So we can clean up some
files which have grown too big.

This tip generously supported by: vinit.adya@citicorp.com


--------------------------------------------------------------------------
To Subscribe: http://www.ugu.com/sui/ugu/show?tip.subscribe
To Unsubscribe: http://www.ugu.com/sui/ugu/show?tip.unsubscribe
To Submit A Tip: http://www.ugu.com/sui/ugu/show?tip.today

==========================================================================
DISCLAIMER: All UNIX HOT TIPS ARE OWNED BY THE UNIX GURU UNIVERSE AND ARE
NOT TO BE SOLD, PRINTED OR USED WITHOUT THE WRITTEN CONSENT OF THE UNIX
GURU UNIVERSE. ALL TIPS ARE "USE AT YOUR OWN RISK". UGU ADVISES THAT
ALL TIPS BE TESTED IN A NON-PRODUCTION DEVELOPMENT ENVIRONMENT FIRST.

Unix Guru Universe - www.ugu.com - tips@ugu.com - Copyright 1994-2001
==========================================================================

Jumat, 15 April 2011

Unix Tip: SUPPLIMENT: DAYLIGHT SAVINGS TIME

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

UNIX GURU UNIVERSE
UNIX HOT TIP

Unix Tip 3353 - April 15, 2011

http://www.ugu.com/sui/ugu/show?tip.today

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


SUPPLIMENT: DAYLIGHT SAVINGS TIME


Daylight savings is about to strike
in some parts of the U.S.:

http://webexhibits.org/daylightsaving/b.html

Remember to check any and all cron
jobs that may run between 2am
and 3am.


The day after the time on remote
systems can be verified quickly
by using telnet to port 13 :

telnet [host] 13


Good Luck!


--------------------------------------------------------------------------
To Subscribe: http://www.ugu.com/sui/ugu/show?tip.subscribe
To Unsubscribe: http://www.ugu.com/sui/ugu/show?tip.unsubscribe
To Submit A Tip: http://www.ugu.com/sui/ugu/show?tip.today

==========================================================================
DISCLAIMER: All UNIX HOT TIPS ARE OWNED BY THE UNIX GURU UNIVERSE AND ARE
NOT TO BE SOLD, PRINTED OR USED WITHOUT THE WRITTEN CONSENT OF THE UNIX
GURU UNIVERSE. ALL TIPS ARE "USE AT YOUR OWN RISK". UGU ADVISES THAT
ALL TIPS BE TESTED IN A NON-PRODUCTION DEVELOPMENT ENVIRONMENT FIRST.

Unix Guru Universe - www.ugu.com - tips@ugu.com - Copyright 1994-2001
==========================================================================

Your Ad Here
Free Automatic Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink