=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3492 - August 31, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
DEMO TO MULTIPLE TERMINALS
Ever want to show multiple
people what you are doing in
a shell.
In the shell doing the demo
type:
% csh -i |& tee /tmp/demo
or
$ csh -i 2>&1 | tee /tmp/demo
In the other shells that are
going to watch the demo type:
% tail -f /tmp/demo
That's it!
--------------------------------------------------------------------------
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, 31 Agustus 2012
Kamis, 30 Agustus 2012
Unix Tip: CUT FROM STANDARD COMMANDS
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3491 - August 30, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
CUT FROM STANDARD COMMANDS
To properly cut the output of
unix standard commands; such
as ls, ps; and properly handle
them without all the extra
spaces, use this:
% ls -lt| tr -s " " | cut -f6-10
% ls -lt| tr -s " " | < --do what ever-- >
tr -s " " ==> here tr in
effect removes all the extra
formatting extra spaces
introduced by unix shell,
for display, and translates
in to format easy to work
with.
If we dont use this tr, then
the -c option of cut will be
unreliable because of varying
size field lengths in the
output and also -f option
will be unreliable because of
extra formatting delimiters.
ls -lt | tr -s " "
ps -ef | tr -s " "
gives us proper output to
properly extract data or
columns.
This tip generously supported by: snlmurthy@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
==========================================================================
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3491 - August 30, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
CUT FROM STANDARD COMMANDS
To properly cut the output of
unix standard commands; such
as ls, ps; and properly handle
them without all the extra
spaces, use this:
% ls -lt| tr -s " " | cut -f6-10
% ls -lt| tr -s " " | < --do what ever-- >
tr -s " " ==> here tr in
effect removes all the extra
formatting extra spaces
introduced by unix shell,
for display, and translates
in to format easy to work
with.
If we dont use this tr, then
the -c option of cut will be
unreliable because of varying
size field lengths in the
output and also -f option
will be unreliable because of
extra formatting delimiters.
ls -lt | tr -s " "
ps -ef | tr -s " "
gives us proper output to
properly extract data or
columns.
This tip generously supported by: snlmurthy@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
==========================================================================
Rabu, 29 Agustus 2012
Unix Tip: PROTCOLS WITH NETSTAT
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3490 - August 29, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
PROTCOLS WITH NETSTAT
Use the command:
% netstat -an
It will show you what ports
are in use on the local and
foreign machines as well as
the protocol running over that
port for that connection and
IP address information. It
also displays the state of
the socket being used.
Using the above tip user can
identify the port to which he
wants to send data is busy
or free.
This tip generously supported by: athresh_2000@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
==========================================================================
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3490 - August 29, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
PROTCOLS WITH NETSTAT
Use the command:
% netstat -an
It will show you what ports
are in use on the local and
foreign machines as well as
the protocol running over that
port for that connection and
IP address information. It
also displays the state of
the socket being used.
Using the above tip user can
identify the port to which he
wants to send data is busy
or free.
This tip generously supported by: athresh_2000@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, 28 Agustus 2012
Unix Tip: SPELL-CHECK WITHIN VI
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3489 - August 28, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
SPELL-CHECK WITHIN VI
To spell-check without
leaving a vi session:
:w !spell -b
--------------------------------------------------------------------------
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
==========================================================================
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3489 - August 28, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
SPELL-CHECK WITHIN VI
To spell-check without
leaving a vi session:
:w !spell -b
--------------------------------------------------------------------------
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, 25 Agustus 2012
Unix Tip: GEEK DECODER RING
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3486 - August 25, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
GEEK DECODER RING
Ever want to sneek some not
quite politically correct
witticism or other thought
past the "non-technical"?
Or maybe you just want to
un[en|de]code bits, hex or
uu text (boring, but more
practical).
Here's some simple perl
code you can use for a
geek/nerd/dweeb "decoder
ring":
ENCODE INTO BITS, HEX, UU:
perl -ne'$b=unpack("b*",$_);@l=$b=~/.{0,56}/g;
print(join("\n",@l))' <<RM
Tron rules!
RM
Just change the "b*" to "h*"
for hexidecimal or "u*" for
uuencoding.
DECODE FROM BITS, HEX, UU:
perl -ne'chomp;$a.=pack"b*",$_;END{print"\n$a\n\n"}'<<RM
00101010010011101111011001110110000001000100111010101110
00110110101001101100111010000100
RM
I include my favorite
messages that I otherwise
might not write out in clear
text in my signature file along
with the decoder code. It's
enough to scare away most. But,
I've found those technically
superior types get more of a
kick out of "decoding" (cut
and paste to UNIX/LINUX
command line) the message
during their more productive
moments. ;-)
This tip generously supported by: rmuhle@tuxzone.net
--------------------------------------------------------------------------
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
==========================================================================
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3486 - August 25, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
GEEK DECODER RING
Ever want to sneek some not
quite politically correct
witticism or other thought
past the "non-technical"?
Or maybe you just want to
un[en|de]code bits, hex or
uu text (boring, but more
practical).
Here's some simple perl
code you can use for a
geek/nerd/dweeb "decoder
ring":
ENCODE INTO BITS, HEX, UU:
perl -ne'$b=unpack("b*",$_);@l=$b=~/.{0,56}/g;
print(join("\n",@l))' <<RM
Tron rules!
RM
Just change the "b*" to "h*"
for hexidecimal or "u*" for
uuencoding.
DECODE FROM BITS, HEX, UU:
perl -ne'chomp;$a.=pack"b*",$_;END{print"\n$a\n\n"}'<<RM
00101010010011101111011001110110000001000100111010101110
00110110101001101100111010000100
RM
I include my favorite
messages that I otherwise
might not write out in clear
text in my signature file along
with the decoder code. It's
enough to scare away most. But,
I've found those technically
superior types get more of a
kick out of "decoding" (cut
and paste to UNIX/LINUX
command line) the message
during their more productive
moments. ;-)
This tip generously supported by: rmuhle@tuxzone.net
--------------------------------------------------------------------------
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, 24 Agustus 2012
Unix Tip: ARCHIVE ONLY FILES
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3485 - August 24, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
ARCHIVE ONLY FILES
The following will archive
only the regular files in
a directory, ommitting
subdirectories and hidden
files:
ls -al | awk '$0!~/^d/ {print $9}' | xargs tar cvf archive_name.tar
This tip generously supported by: steve-g@bigfoot.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
==========================================================================
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3485 - August 24, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
ARCHIVE ONLY FILES
The following will archive
only the regular files in
a directory, ommitting
subdirectories and hidden
files:
ls -al | awk '$0!~/^d/ {print $9}' | xargs tar cvf archive_name.tar
This tip generously supported by: steve-g@bigfoot.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, 23 Agustus 2012
Unix Tip: FIND AND EDIT STRINGS
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3484 - August 23, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
FIND AND EDIT STRINGS
Ever found a need to find
for a particular string
across the file system and
edit all those files which
contains that particular
string??
Here is a simple way.
Suppose you want to search
for a pattern "mphasis" across
file system and edit those
files..
Just type this at the
command prompt:
vi `find . -name "*" -exec grep -l mphasis {} \; -print`
This tip is supported by: Manjunath.Alkod@mphasis.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
==========================================================================
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3484 - August 23, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
FIND AND EDIT STRINGS
Ever found a need to find
for a particular string
across the file system and
edit all those files which
contains that particular
string??
Here is a simple way.
Suppose you want to search
for a pattern "mphasis" across
file system and edit those
files..
Just type this at the
command prompt:
vi `find . -name "*" -exec grep -l mphasis {} \; -print`
This tip is supported by: Manjunath.Alkod@mphasis.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
==========================================================================
Rabu, 22 Agustus 2012
Unix Tip: GRABBING THE HIDDEN
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3483 - August 22, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
GRABBING THE HIDDEN
To easily select all
hidden files, use the
following:
.[^.]* ..?*
For example,
echo .[^.]* ..?*
will output a list of
all hidden files in your
current directory.
.[^.]* selects all files
starting with a dot but NOT
having a dot as their
second character.
..?* selects all files
starting with two dots and
having at least one additional
character
Together, they will retrieve
ANY file starting with '.'
except '.' and '..' (even
tricky ones like '...hideme')
The ^ (caret) symbol can be
used as the first character
inside [ ] at any time to say
"not one of the following"
rather than the usual "any one
of the following."
[^0-9a-fA-F] will match any
character that is NOT a hex
digit.
This tip generously supported by: wurzel@concentric.net
--------------------------------------------------------------------------
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
==========================================================================
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3483 - August 22, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
GRABBING THE HIDDEN
To easily select all
hidden files, use the
following:
.[^.]* ..?*
For example,
echo .[^.]* ..?*
will output a list of
all hidden files in your
current directory.
.[^.]* selects all files
starting with a dot but NOT
having a dot as their
second character.
..?* selects all files
starting with two dots and
having at least one additional
character
Together, they will retrieve
ANY file starting with '.'
except '.' and '..' (even
tricky ones like '...hideme')
The ^ (caret) symbol can be
used as the first character
inside [ ] at any time to say
"not one of the following"
rather than the usual "any one
of the following."
[^0-9a-fA-F] will match any
character that is NOT a hex
digit.
This tip generously supported by: wurzel@concentric.net
--------------------------------------------------------------------------
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, 21 Agustus 2012
Unix Tip: VI INDENTATION
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3482 - August 21, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
VI INDENTATION
Indent your lines or remove
the indentation in the vi
editor.
<< Shifts the current line to the left by one shift width.
>> Shifts the current line to the right by one shift width.
You can set the shift width
by command
:set sw
For example, the command to
set the shift width to 4
characters is
:set sw=4.
This tip generously supported by: neetas@noida.hcltech.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
==========================================================================
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3482 - August 21, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
VI INDENTATION
Indent your lines or remove
the indentation in the vi
editor.
<< Shifts the current line to the left by one shift width.
>> Shifts the current line to the right by one shift width.
You can set the shift width
by command
:set sw
For example, the command to
set the shift width to 4
characters is
:set sw=4.
This tip generously supported by: neetas@noida.hcltech.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, 20 Agustus 2012
Unix Tip: TAR IS A ZIP
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3481 - August 20, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
TAR IS A ZIP
Ever want to tar and compress
a file all in one command:
tar cf - /home/foo | compress > foo.tar.Z
gzip can be used the same way
tar cf - /home/foo | gzip > foo.tar.Z
If you wanted to capture the
output so you had an index file
of what the tar file contains:
For sh, ksh use:
tar cvf - /home/foo 2>foo.idx | compress > foo.tar.Z
For csh use:
(tar cvf - /home/foo | compress > /foo.tar.Z) >&foo.idx
and an index file will be created.
--------------------------------------------------------------------------
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
==========================================================================
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3481 - August 20, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
TAR IS A ZIP
Ever want to tar and compress
a file all in one command:
tar cf - /home/foo | compress > foo.tar.Z
gzip can be used the same way
tar cf - /home/foo | gzip > foo.tar.Z
If you wanted to capture the
output so you had an index file
of what the tar file contains:
For sh, ksh use:
tar cvf - /home/foo 2>foo.idx | compress > foo.tar.Z
For csh use:
(tar cvf - /home/foo | compress > /foo.tar.Z) >&foo.idx
and an index file will be created.
--------------------------------------------------------------------------
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, 18 Agustus 2012
Unix Tip: RECURSIVE CASE CHANGE
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3479 - August 18, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
RECURSIVE CASE CHANGE
To convert the file names from
upper case to lower in all
subdirectories a simple script
can be used:
for i in $*
do
mv $i `echo $i | tr A-Z a-z`
done
This tip generously supported by: ksatish@in.ibm.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
==========================================================================
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3479 - August 18, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
RECURSIVE CASE CHANGE
To convert the file names from
upper case to lower in all
subdirectories a simple script
can be used:
for i in $*
do
mv $i `echo $i | tr A-Z a-z`
done
This tip generously supported by: ksatish@in.ibm.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, 17 Agustus 2012
Unix Tip: RENAMING UNPRINTABLE DIRECTORIES
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3478 - August 17, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
RENAMING UNPRINTABLE DIRECTORIES
This happened just the other day,
and wanted to make it available.
We discovered a directory with
no name or unprintable characters:
foohost# ls -ail
208978 drwxr-xr-x 1 2430 Aug 3 13:08
209299 drwxr-xr-x 24 3287 Oct 25 1993 .
208946 drwxr-xr-x 49 447 Jun 22 1993 ..
Using the '-i' option in ls
provided the inode of the directory.
We then were able to move the
directory to another name so we
could see what was in it using
a find command:
foohost# find . -inum 208946 -exec mv {} new.dir \;
Worked like a charm.
--------------------------------------------------------------------------
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
==========================================================================
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3478 - August 17, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
RENAMING UNPRINTABLE DIRECTORIES
This happened just the other day,
and wanted to make it available.
We discovered a directory with
no name or unprintable characters:
foohost# ls -ail
208978 drwxr-xr-x 1 2430 Aug 3 13:08
209299 drwxr-xr-x 24 3287 Oct 25 1993 .
208946 drwxr-xr-x 49 447 Jun 22 1993 ..
Using the '-i' option in ls
provided the inode of the directory.
We then were able to move the
directory to another name so we
could see what was in it using
a find command:
foohost# find . -inum 208946 -exec mv {} new.dir \;
Worked like a charm.
--------------------------------------------------------------------------
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, 16 Agustus 2012
Unix Tip: YET ANOTHER COUNTDOWN
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3477 - August 16, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
YET ANOTHER COUNTDOWN
The unix time() value will rollover
to 10 digits for the first time in
modern computer history starting
Saturday Sept 8th,2001. The
timestamp will be 10 digits long,
and not 9.
Here's a short Perl script to
compute the time left:
#!/usr/bin/perl -w
use strict;
my $now=time();
my $target='1000000000';
my
($sec,$min,$hrs,$dom,$mon,$year,$wday,$yday,$isdst)=localtime($target
- $now);
my $now_string=localtime(time());
my $target_string=localtime($target);
my $message=qq{today is $now_string\n$mon months $dom days $hrs
hours $min minutes $sec seconds left till U1e9
($target_string)\n};
print $message;
This tip generously supported by: scooper@absolutemadness.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
==========================================================================
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3477 - August 16, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
YET ANOTHER COUNTDOWN
The unix time() value will rollover
to 10 digits for the first time in
modern computer history starting
Saturday Sept 8th,2001. The
timestamp will be 10 digits long,
and not 9.
Here's a short Perl script to
compute the time left:
#!/usr/bin/perl -w
use strict;
my $now=time();
my $target='1000000000';
my
($sec,$min,$hrs,$dom,$mon,$year,$wday,$yday,$isdst)=localtime($target
- $now);
my $now_string=localtime(time());
my $target_string=localtime($target);
my $message=qq{today is $now_string\n$mon months $dom days $hrs
hours $min minutes $sec seconds left till U1e9
($target_string)\n};
print $message;
This tip generously supported by: scooper@absolutemadness.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
==========================================================================
Rabu, 15 Agustus 2012
Unix Tip: KILL IDLE USERS
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3476 - August 15, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
KILL IDLE USERS
Here is a quick script to
kill idle users at the 10
hour mark.
Cchange the 10 to the hour
you would like to kill at
and #run as cron every hour
This is for HP UNIX, check
the fields on the "who"
command for your flavor
------- cut here ----------
who -u | cut -c 1-10,39-50 | grep 10: > current
for each IDLE_USR ( `cat current | awk '{print $3}'` )
kill -9 $IDLE_USR
end
exit (0)
------- cut here ----------
--------------------------------------------------------------------------
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
==========================================================================
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3476 - August 15, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
KILL IDLE USERS
Here is a quick script to
kill idle users at the 10
hour mark.
Cchange the 10 to the hour
you would like to kill at
and #run as cron every hour
This is for HP UNIX, check
the fields on the "who"
command for your flavor
------- cut here ----------
who -u | cut -c 1-10,39-50 | grep 10: > current
for each IDLE_USR ( `cat current | awk '{print $3}'` )
kill -9 $IDLE_USR
end
exit (0)
------- cut here ----------
--------------------------------------------------------------------------
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, 14 Agustus 2012
Unix Tip: FINDING CONTROL CHARACTERS
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3475 - August 14, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
FINDING CONTROL CHARACTERS
To find out the control
characters in a file, we
can use following two methods:
% cat -vet filename
or edit the file using vi:
:set list
This tip generously supported by: tb.unnikrishnan@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
==========================================================================
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3475 - August 14, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
FINDING CONTROL CHARACTERS
To find out the control
characters in a file, we
can use following two methods:
% cat -vet filename
or edit the file using vi:
:set list
This tip generously supported by: tb.unnikrishnan@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
==========================================================================
Senin, 13 Agustus 2012
Unix Tip: VI AND NOT DISK SPACE
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3474 - August 13, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
VI AND NOT DISK SPACE
If you get the error while
opening a file in vi,
"There is not enough space in the file system.
[Press return to continue]"
and you know that you have
space in your home directory,
than simply use this command
in vi, say
:set dir=</export/home/foobar>
then press:
:e .
You will be able to see the
entire file.
This tip generously supported by: kramakri@visa.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
==========================================================================
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3474 - August 13, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
VI AND NOT DISK SPACE
If you get the error while
opening a file in vi,
"There is not enough space in the file system.
[Press return to continue]"
and you know that you have
space in your home directory,
than simply use this command
in vi, say
:set dir=</export/home/foobar>
then press:
:e .
You will be able to see the
entire file.
This tip generously supported by: kramakri@visa.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, 12 Agustus 2012
Unix Tip: CHANGE TO LAST DIRECTORY
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3473 - August 12, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
CHANGE TO LAST DIRECTORY
Return to the previous directory:
To return to the last directory we
were working in type.
cd ~-
This tip generously supported by: Prashant.Mhatre@nasd.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
==========================================================================
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3473 - August 12, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
CHANGE TO LAST DIRECTORY
Return to the previous directory:
To return to the last directory we
were working in type.
cd ~-
This tip generously supported by: Prashant.Mhatre@nasd.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
==========================================================================
Sabtu, 11 Agustus 2012
Unix Tip: COUNTING BLANK LINES
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3472 - August 11, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
COUNTING BLANK LINES
Counting blank lines in
a file which may include
spaces and tabs:
cat filename |awk ' /^['\ '|'\\t']*$/ { ++x } END { print "No. of Blank Lines = " x } '
This tip generously supported by: rajibroy@engineer.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
==========================================================================
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3472 - August 11, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
COUNTING BLANK LINES
Counting blank lines in
a file which may include
spaces and tabs:
cat filename |awk ' /^['\ '|'\\t']*$/ { ++x } END { print "No. of Blank Lines = " x } '
This tip generously supported by: rajibroy@engineer.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, 10 Agustus 2012
Unix Tip: GETTING MORE FROM SIGSEGV
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3471 - August 10, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
GETTING MORE FROM SIGSEGV
For those who want to get
more info on SIGSEGV for
your application in Linux,
you can use the following
command "catchsegv".
for eg: consider the program (a.c)
main()
{
char *p = 0;
*p = 'a';
}
$cc a.c
$catchsegv a.out #produces the following output
*** Segmentation fault
Register dump:
EAX: 00000000 EBX: 4010e1ec ECX: 08048398 EDX: 4010f098
ESI: 4000ae60 EDI: bffffafc EBP: bffffab0 ESP: bffffaac
EIP: 080483a8 EFLAGS: 00010296
CS: 0023 DS: 002b ES: 002b FS: 0000 GS: 0000 SS: 002b
Trap: 0000000e Error: 00000006 OldMask: 00000000
ESP/signal: bffffaac CR2: 00000000
FPUCW: ffff037f FPUSW: ffff0000 TAG: ffffffff
IPOFF: 00000000 CSSEL: 0000 DATAOFF: 0000ffff DATASEL:
0000
ST(0) 0000 0000000000000000 ST(1) 0000 cf118de5ab2a5800
ST(2) 0000 feb02a6c405d9ad4 ST(3) 0000 0000000000000000
ST(4) 0000 8000000000000000 ST(5) 0000 8000000000000000
ST(6) 0000 0000000000000000 ST(7) 0000 847fffdee0000848
Backtrace:
/usr/src/bs/BUILD/glibc-2.1.3/csu/init.c:0(??)[0x80483a8]
/lib/libc.so.6(__libc_start_main+0xff)[0x400369cb]
??:0(_start)[0x8048311]
"csv" 25L, 860C
--------------------------------------------------------------------------
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
==========================================================================
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3471 - August 10, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
GETTING MORE FROM SIGSEGV
For those who want to get
more info on SIGSEGV for
your application in Linux,
you can use the following
command "catchsegv".
for eg: consider the program (a.c)
main()
{
char *p = 0;
*p = 'a';
}
$cc a.c
$catchsegv a.out #produces the following output
*** Segmentation fault
Register dump:
EAX: 00000000 EBX: 4010e1ec ECX: 08048398 EDX: 4010f098
ESI: 4000ae60 EDI: bffffafc EBP: bffffab0 ESP: bffffaac
EIP: 080483a8 EFLAGS: 00010296
CS: 0023 DS: 002b ES: 002b FS: 0000 GS: 0000 SS: 002b
Trap: 0000000e Error: 00000006 OldMask: 00000000
ESP/signal: bffffaac CR2: 00000000
FPUCW: ffff037f FPUSW: ffff0000 TAG: ffffffff
IPOFF: 00000000 CSSEL: 0000 DATAOFF: 0000ffff DATASEL:
0000
ST(0) 0000 0000000000000000 ST(1) 0000 cf118de5ab2a5800
ST(2) 0000 feb02a6c405d9ad4 ST(3) 0000 0000000000000000
ST(4) 0000 8000000000000000 ST(5) 0000 8000000000000000
ST(6) 0000 0000000000000000 ST(7) 0000 847fffdee0000848
Backtrace:
/usr/src/bs/BUILD/glibc-2.1.3/csu/init.c:0(??)[0x80483a8]
/lib/libc.so.6(__libc_start_main+0xff)[0x400369cb]
??:0(_start)[0x8048311]
"csv" 25L, 860C
--------------------------------------------------------------------------
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, 09 Agustus 2012
Unix Tip: ANOTHER UPPER TO LOWER
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3470 - August 9, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
ANOTHER UPPER TO LOWER
Changing file Names From
UPPER TO LOWER case and
vice versa
This script can be used
to convert the file names
from upper case to lower
case and vice versa.
####################
typeset -u Lcase
for Ucase in `ls`
do
Lcase=$Ucase
mv $Ucase $Lcase
done
######################
And to convert from lower
case to upper case, just
change (typeset -u ) to
be ( typeset -l ).
This tip generously supported by: yousif_morckos@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
==========================================================================
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3470 - August 9, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
ANOTHER UPPER TO LOWER
Changing file Names From
UPPER TO LOWER case and
vice versa
This script can be used
to convert the file names
from upper case to lower
case and vice versa.
####################
typeset -u Lcase
for Ucase in `ls`
do
Lcase=$Ucase
mv $Ucase $Lcase
done
######################
And to convert from lower
case to upper case, just
change (typeset -u ) to
be ( typeset -l ).
This tip generously supported by: yousif_morckos@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
==========================================================================
Rabu, 08 Agustus 2012
Unix Tip: APPENDING TEXT AT BOTH ENDS
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3469 - August 8, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
APPENDING TEXT AT BOTH ENDS
If you need to append some
text to both the ends of a
string in vi, use the
following command in vi:
:/^\(.*\)/s//starttextcomeshere \1 endtextcomeshere/
If "iamworthless" is the text
at the position of the cursor
in the vi editor, the output
of the command:
:/^\(.*\)/s//DONTFEEL \1 ANYTIME/
DONTFEEL iamworthless ANYTIME
As you guessed, "DONTFEEL " and
" ANYTIME" are the strings you
would like to crush
"iamworthless" with. The "\1" is
the variable that stores the
entire pattern searched by
the "/\(.*\)/"
This tip generously supported by: hg_krishnan@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
==========================================================================
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3469 - August 8, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
APPENDING TEXT AT BOTH ENDS
If you need to append some
text to both the ends of a
string in vi, use the
following command in vi:
:/^\(.*\)/s//starttextcomeshere \1 endtextcomeshere/
If "iamworthless" is the text
at the position of the cursor
in the vi editor, the output
of the command:
:/^\(.*\)/s//DONTFEEL \1 ANYTIME/
DONTFEEL iamworthless ANYTIME
As you guessed, "DONTFEEL " and
" ANYTIME" are the strings you
would like to crush
"iamworthless" with. The "\1" is
the variable that stores the
entire pattern searched by
the "/\(.*\)/"
This tip generously supported by: hg_krishnan@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, 07 Agustus 2012
Unix Tip: CONVERTING UNIX MAN PAGES
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3468 - August 7, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
CONVERTING UNIX MAN PAGES
(Another approach)
To convert Unix Man pages
to text format, you can make
use of one feature of 'man'
itself.
(Check out man man)
Set environment variable PAGER
to 'cat'. Then run
% man command_name > command_name.txt
eg. in csh, to see man ls in
a text file
% setenv PAGER cat
% man ls > ls.txt
NOTE: Do not forget to unsetenv
PAGER, else you will have to
pipe every man command to
'more' or (my favourite) 'less'.
This tip generously supported by: amar_san@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
==========================================================================
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3468 - August 7, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
CONVERTING UNIX MAN PAGES
(Another approach)
To convert Unix Man pages
to text format, you can make
use of one feature of 'man'
itself.
(Check out man man)
Set environment variable PAGER
to 'cat'. Then run
% man command_name > command_name.txt
eg. in csh, to see man ls in
a text file
% setenv PAGER cat
% man ls > ls.txt
NOTE: Do not forget to unsetenv
PAGER, else you will have to
pipe every man command to
'more' or (my favourite) 'less'.
This tip generously supported by: amar_san@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
==========================================================================
Senin, 06 Agustus 2012
Unix Tip: REMOVING FILES WITH BAD FILE NAMES
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3467 - August 6, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
REMOVING FILES WITH BAD FILE NAMES
If a file has a special
character, Unix will try to
interpret the character.
Renaming these type of files
cannot be done with a simple
"mv".....it will have to be
done using the file's inode.
For example:
# ls -i "GSO (website)"
(the "-i" flag will display the file's inode)
41734 GSO(website)
...the inode for the "bad" file is "41734"
1. once the inode is identified, use the find command to
rename the file:
find . -inum 41734 -exec mv \{\} NewName \;
2. do an "ls" to verify
This tip generously supported by: arimaldo@earthlink.net
--------------------------------------------------------------------------
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
==========================================================================
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3467 - August 6, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
REMOVING FILES WITH BAD FILE NAMES
If a file has a special
character, Unix will try to
interpret the character.
Renaming these type of files
cannot be done with a simple
"mv".....it will have to be
done using the file's inode.
For example:
# ls -i "GSO (website)"
(the "-i" flag will display the file's inode)
41734 GSO(website)
...the inode for the "bad" file is "41734"
1. once the inode is identified, use the find command to
rename the file:
find . -inum 41734 -exec mv \{\} NewName \;
2. do an "ls" to verify
This tip generously supported by: arimaldo@earthlink.net
--------------------------------------------------------------------------
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, 05 Agustus 2012
Unix Tip: CSH PROMPT SETTING
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3466 - August 5, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
CSH PROMPT SETTING
In (t)csh, here is a better way to
set your prompt to always let you
know where on the system you are.
In your .cshrc file, add
or set the following line:
set prompt = "%m%/% "
This way, whenever you press return,
or a job finishes, the prompt will
always tell you where you are,
without having to change directories
first. Of extra usefulness, the '%m%'
token expands to the machine name.
If you work on a multimachine system,
knowing which machine you're on is
usually of more immediate importance
than where on the machine you are.
--------------------------------------------------------------------------
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
==========================================================================
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3466 - August 5, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
CSH PROMPT SETTING
In (t)csh, here is a better way to
set your prompt to always let you
know where on the system you are.
In your .cshrc file, add
or set the following line:
set prompt = "%m%/% "
This way, whenever you press return,
or a job finishes, the prompt will
always tell you where you are,
without having to change directories
first. Of extra usefulness, the '%m%'
token expands to the machine name.
If you work on a multimachine system,
knowing which machine you're on is
usually of more immediate importance
than where on the machine you are.
--------------------------------------------------------------------------
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, 04 Agustus 2012
Unix Tip: CONVERT TEXT2HTML
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3465 - August 4, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
CONVERT TEXT2HTML
Ever felt the need to convert a
text file to html?
Create a file named txt2html
with the following contents
# Always start the output with
#an html header
BEGIN {print "<html>"
print "<head>"
# use the name of the inputfile
# as title
print "<title>" FILENAME "</title>"
print "</head>"
# The text is formatted
# already, so use <pre>
print "<body><pre>"}
# lines consisting of a number
# of dashes (more than 1) are
# replaced by a <hr>
/^---*$/ {print "<hr align=\"left\" width=" length "0 size=1>"; next}
# lines consisting of a number of equalsigns are replaced
# by a thick <hr>
/^===*$/ {print "<hr align=\"left\" width=" length "0 size=3>"; next}
# less than and greater than
# sign must me replaced by tags.
{gsub("<","\<")
gsub(">","\>")
# Replace form feeds by a
# couple of empty lines
gsub("^L","<br>\ <br>\ <br>\ <br>")
print}
# At the end of the output,
# we must add some closing tags.
END {print "</pre></body>"}
Make this executable
(chmod a+x txt2html) and you're
ready to start converting your test files.
txt2html something.txt > something.html
This tip generously supported by: ugu@couprie.org
--------------------------------------------------------------------------
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
==========================================================================
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3465 - August 4, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
CONVERT TEXT2HTML
Ever felt the need to convert a
text file to html?
Create a file named txt2html
with the following contents
# Always start the output with
#an html header
BEGIN {print "<html>"
print "<head>"
# use the name of the inputfile
# as title
print "<title>" FILENAME "</title>"
print "</head>"
# The text is formatted
# already, so use <pre>
print "<body><pre>"}
# lines consisting of a number
# of dashes (more than 1) are
# replaced by a <hr>
/^---*$/ {print "<hr align=\"left\" width=" length "0 size=1>"; next}
# lines consisting of a number of equalsigns are replaced
# by a thick <hr>
/^===*$/ {print "<hr align=\"left\" width=" length "0 size=3>"; next}
# less than and greater than
# sign must me replaced by tags.
{gsub("<","\<")
gsub(">","\>")
# Replace form feeds by a
# couple of empty lines
gsub("^L","<br>\ <br>\ <br>\ <br>")
print}
# At the end of the output,
# we must add some closing tags.
END {print "</pre></body>"}
Make this executable
(chmod a+x txt2html) and you're
ready to start converting your test files.
txt2html something.txt > something.html
This tip generously supported by: ugu@couprie.org
--------------------------------------------------------------------------
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, 03 Agustus 2012
Unix Tip: EFFICIENT COMMANDS
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3464 - August 3, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
EFFICIENT COMMANDS
I cringe anytime I see someone code
inefficiently. Here are three of the
most common mistakes, followed by a
better way to do the same thing.
Bad: cat somefile | grep something
Better: grep something somefile
Why: You're running one program (grep) instead of two (cat and grep).
Bad: ps -ef | grep something | grep -v grep
Better: ps -ef | grep [s]omething
Why: You're running two commands (grep) instead of three (ps
and two greps).
Bad: cat /dev/null > somefile
Better: > somefile
Why: You're running a command (cat) with I/O redirection,
instead of just redirection.
Although the bad way will have the
same result, the good way is far
faster. This may seem trivial, but
the benefits will really show when
dealing with large files or loops.
Regards.
This tip generously supported by: sec@nbnet.nb.ca
--------------------------------------------------------------------------
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
==========================================================================
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3464 - August 3, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
EFFICIENT COMMANDS
I cringe anytime I see someone code
inefficiently. Here are three of the
most common mistakes, followed by a
better way to do the same thing.
Bad: cat somefile | grep something
Better: grep something somefile
Why: You're running one program (grep) instead of two (cat and grep).
Bad: ps -ef | grep something | grep -v grep
Better: ps -ef | grep [s]omething
Why: You're running two commands (grep) instead of three (ps
and two greps).
Bad: cat /dev/null > somefile
Better: > somefile
Why: You're running a command (cat) with I/O redirection,
instead of just redirection.
Although the bad way will have the
same result, the good way is far
faster. This may seem trivial, but
the benefits will really show when
dealing with large files or loops.
Regards.
This tip generously supported by: sec@nbnet.nb.ca
--------------------------------------------------------------------------
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, 02 Agustus 2012
Unix Tip: TOO MANY FILES AROUND
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3463 - August 2, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
TOO MANY FILES AROUND
In case there are too many
files in a particular
directory. When the
following is executed:
$grep "ABC" *
And it fails saying with
ksh: /usr/bin/find: 0403-027 The parameter list is too long.
what would you do?
Well you can do the following:
$ls |xargs grep "ABC"
-----
Puneet Agarwal
This tip generously supported by: puneeta@delhi.tcs.co.in
--------------------------------------------------------------------------
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
==========================================================================
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3463 - August 2, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
TOO MANY FILES AROUND
In case there are too many
files in a particular
directory. When the
following is executed:
$grep "ABC" *
And it fails saying with
ksh: /usr/bin/find: 0403-027 The parameter list is too long.
what would you do?
Well you can do the following:
$ls |xargs grep "ABC"
-----
Puneet Agarwal
This tip generously supported by: puneeta@delhi.tcs.co.in
--------------------------------------------------------------------------
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, 01 Agustus 2012
Unix Tip: EXTRACT RELATIVE FROM ABSOLUTE
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3462 - August 1, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
EXTRACT RELATIVE FROM ABSOLUTE
Ever had a tar archive which
was tarred up with an absolute
path, but you need to untar
it to a relative location?
There is an easy way to do
this using the "pax" command.
Note: Not available on all
flavors.
Firstly, copy the archive to
the relative location in
which you wish to untar it.
Then, execute the following
command:
pax -r -s ',^/,,' -f file.tar
The contents of file.tar will now
be in the $CWD.
--------------------------------------------------------------------------
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
==========================================================================
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 3462 - August 1, 2012
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
EXTRACT RELATIVE FROM ABSOLUTE
Ever had a tar archive which
was tarred up with an absolute
path, but you need to untar
it to a relative location?
There is an easy way to do
this using the "pax" command.
Note: Not available on all
flavors.
Firstly, copy the archive to
the relative location in
which you wish to untar it.
Then, execute the following
command:
pax -r -s ',^/,,' -f file.tar
The contents of file.tar will now
be in the $CWD.
--------------------------------------------------------------------------
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
==========================================================================
Langganan:
Postingan (Atom)