Deleting lines from the text file

2010-06-01 177 words 1 min read

Really useful for pretty big <a class="zem_slink freebase/en/computer_file" title="Computer file" rel="wikipedia" href="http://en.wikipedia.org/wiki/Computer_file">files.

<a class="zem_slink freebase/en/sed" title="Sed" rel="wikipedia" href="http://en.wikipedia.org/wiki/Sed">sed –silent &#8217;1,100 d&#8217; <a class="zem_slink freebase/en/filename" title="Filename" rel="wikipedia" href="http://en.wikipedia.org/wiki/Filename">filename

here the command will delete the first 100 lines. You can specify whatever range you want. This will not delete the lines from the file but only display the contents on the console after deleting the 100 lines from begining.

If you want to store it in different file then you can use &#8221;>&#8221; or &#8221;»&#8221;<h6 class="zemanta-related-title">Related articles by Zemanta <ul class="zemanta-article-ul"> <li class="zemanta-article-ul-li"><a href="http://www.centernetworks.com/guhmshoo-quit-facebook-day-cartoon">Guhmshoo Looks at Quit Facebook Day (cartoon) (centernetworks.com) <li class="zemanta-article-ul-li"><a href="http://blogs.securiteam.com/index.php/archives/1374">Sometimes it&#8217;s just Windows … (blogs.securiteam.com) <li class="zemanta-article-ul-li"><a href="http://www.makeuseof.com/tag/2-ingenious-apps-to-help-organize-files-and-folders-on-your-mac/">2 Ingenious Apps To Help Organize Files and Folders On Your Mac (makeuseof.com) <li class="zemanta-article-ul-li"><a href="http://www.labnol.org/software/windows-problems-and-solutions/13766/">Simple Solutions to Common Windows Problems (labnol.org) <li class="zemanta-article-ul-li"><a href="http://techblissonline.com/bluray-dvd-cd-data-file-recovery-software-free-download/">Blu Ray/DVD/CD Data file recovery software (free) to recover damaged files (techblissonline.com) <li class="zemanta-article-ul-li"><a href="http://www.ghacks.net/2010/05/23/get-rid-of-gnome-keyring-password-reminder/">Get rid of GNOME keyring password reminder (ghacks.net) <div class="zemanta-pixie"><a class="zemanta-pixie-a" title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/a2e0d6ba-15f8-4a53-9f52-a28012b689cb/"><img class="zemanta-pixie-img" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/reblog_b93.png" alt="Reblog this post [with Zemanta]" /><span class="zem-script more-related more-info pretty-attribution paragraph-reblog">


author

Authored By Amit Agarwal

Amit Agarwal, Linux and Photography are my hobbies.Creative Commons Attribution 4.0 International License.

We notice you're using an adblocker. If you like our webite please keep us running by whitelisting this site in your ad blocker. We’re serving quality, related ads only. Thank you!

I've whitelisted your website.

Not now
This website uses cookies to ensure you get the best experience on our website. Learn more Got it