Your Ad Here

Sabtu, 07 Januari 2006

Unix Tip: SOLARIS PACKAGE INFO

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

UNIX GURU UNIVERSE
UNIX HOT TIP

Unix Tip 2198 - January 7, 2006

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

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

SOLARIS PACKAGE INFO

If you want to find the status of just your Veritas (or someother software vendors) packages installed on your Sun system, use this string. It will give a long listing of all packages for that vendor and their status.

pkginfo -l `pkginfo | grep -i VERITAS | awk '{print $2}'`


This tip generously supported by: daniel.bach@pleasantco.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, 06 Januari 2006

Unix Tip: KEEPING MORE USERS OUT

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

UNIX GURU UNIVERSE
UNIX HOT TIP

Unix Tip 2197 - January 6, 2006

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

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

KEEPING MORE USERS OUT

Here's an alternate approach to tip 1807, regarding keeping users from logging in during maintenance (or whatever).

Create a file called "nologin" that contains the text of a message to display to denied login attempts. The file location depends on the UNIX variant. BSD-derivatives (including Solaris) seem to favor /etc. Linux prefers /var/run.
Make the file world-readable.

With that file in place, anyone (except root) attempting to log in will be shown the contents of the file, and then dropped. Some variants will (I think) await a keystroke, to be sure the message is seen - others just flash it by.
I don't know if that timing is tuneable.

This is referenced in the man page for the login command.

Several years ago, in an environment where I had to deal with this a lot, I worked up a script (cryptically named "logins") that would either query the state of login acess, or allow me to toggle it on or off quickly. It's not elegant, but it did the job. If anyone is interested, I'd be happy to send it.
8-)

This tip is supported by: swezwho@yahoo.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
==========================================================================

Kamis, 05 Januari 2006

Unix Tip: YET ANOTHER DIR COPIER

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

UNIX GURU UNIVERSE
UNIX HOT TIP

Unix Tip 2196 - January 5, 2006

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

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

YET ANOTHER DIR COPIER

To copy the entire contents of a directory while preserving the permissions, times and ownership, use find(1) and cpio(1):

cd /path/to/src/dir
find . | cpio -pdumv /path/to/dest/dir

The cpio(1) options are easy to remember: just say "pee-dum-vee".
HP-UX users may need to add option x: "pee-dum-vee-x".

Some versions of find(1) may require the -print option to actually print out what was found.

Original credit: Hewlett-Packard

Louis Bertrand Durham College


--------------------------------------------------------------------------
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, 04 Januari 2006

Unix Tip: CREATING TRASH

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

UNIX GURU UNIVERSE
UNIX HOT TIP

Unix Tip 2195 - January 4, 2006

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

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


CREATING TRASH

Sometimes unwittingly we may delete some important files and realise it later. To avoid such a situation, you can use this following idea.

Create a small bash script containing the line

mv $1 ~/trash/

Save this file in your home say
".srm" (safe rm) and in your
".bashrc" enter this line:

alias rm='~/.srm'

Now whenever you delete any files it will go to "trash" directory instead of deletion. You will have to create a "trash" directory in your home directory.


This tip generously supported by: smk_bk@yahoo.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, 03 Januari 2006

Unix Tip: CONVERT MAN PAGES TO TEXT

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

UNIX GURU UNIVERSE
UNIX HOT TIP

Unix Tip 2194 - January 3, 2006

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

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


CONVERT MAN PAGES TO TEXT

There can often be times when you want man pages in print, or to simply save them to text for something like HTML use. The common thing that people do is:

man lp > lp.txt

This will take the output of lp and put it to a file named lp.txt, but it will keep all the formatting in the document. In order to get rid of those characters, do the following:

man lp | col -b > lp.txt

Create the text file both ways naming one of them "lp2.txt" and do a "diff" on them. You'll see the difference then.


This tip generously supported by: ashutosh.varshney@st.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
==========================================================================

Senin, 02 Januari 2006

Unix Tip: WHO HITS MY WEBSITE

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

UNIX GURU UNIVERSE
UNIX HOT TIP

Unix Tip 2193 - January 2, 2006

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

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


WHO HITS MY WEBSITE

This will generate a listing of all IPs that have accessed a specific directory of my website (the /foo/ directory), and print a count (from greatest to least) next to the IP.

if you want to get a total listing for all directories of a domain, just omit the "grep -e /foo/" statement.

cat /home/server.com/logs/access_log |
grep -e /flesh/ |
sort |
uniq -w15 -c |
cut -f 1 -d- |
sort -r -g


Using this format for the apache log files: 63.26.57.218 - - [07/Mar/2001:21:12:15 -0500] "GET /flesh/fleshpix/thumbs/facial2/poofylips.jpg_t.jpg HTTP/1.1" 200 4353


Sample output is:
123 62.155.255.18
123 216.17.9.140
121 62.98.129.125
120 66.32.16.55
120 216.196.144.202
119 194.100.2.65
116 194.170.1.68
114 62.155.255.21

--------------------------------------------------------------------------
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, 01 Januari 2006

Unix Tip: SAYING PUT AND EXECUTING ELSEWHERE

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

UNIX GURU UNIVERSE
UNIX HOT TIP

Unix Tip 2192 - January 1, 2006

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

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


SAYING PUT AND EXECUTING ELSEWHERE

Doing things from the present directory. Say, if you want to list all the files in /etc directory being in your present
directory you can do so by typing

$ (cd /etc; ls -l)

You will get the listing but you are still in your present directory.

This is also useful in executing scripts without leaving your current directory.

This tip generously supported by: k.chandrakumar@gxs.ge.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
==========================================================================

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