[olug] Unix Tip: EDITING OF LARGE FILES
Unix Guru Universe
listserv at ugu.com
Fri Nov 29 19:03:44 UTC 2002
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
UNIX GURU UNIVERSE
UNIX HOT TIP
Unix Tip 2159 - November 29, 2002
http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
EDITING OF LARGE FILES
Ever failed to open a very large
file for editing in vi. Just try
this tip:
Suppose you want to make changes
in top 500 lines of a 100 line file
abc.txt.
tail +500 abc.txt > tail.txt
head -500 abc.txt > head.txt
Edit file head.txt by opening in
a vi editor.
Now append file tail.txt to
head.txt by:
cat tail.txt >> head.txt
mv head.txt > abc.txt
rm head.txt tail.txt
This tip generously supported by: akash at cadence.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 at ugu.com - Copyright 1994-2001
==========================================================================
More information about the OLUG
mailing list