Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I can't test this at my current location, but I think that this will work as well:
That would actually delete the entire file's contents. dG is just as good, except you'd need to start from line 1 to get it to remove the whole thing. Then of course there is the "> filename" suggestion. All of those ways would work fine (assuming I'm right about d%).
EDIT : The following is the correct method:
Thanks, Mr. C.!
Last edited by KasMage; 07-30-2008 at 09:22 AM.
Reason: Edited in corrected operation
He's talking about cleaning out a 3GB file (see OP). I still think doing it at the cmd line makes more sense. No need to go into an editor. Remember vi/vim makes a temp backup while the file is open...
Incidentally, 'dd' only deletes 1 line.