Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!

Notices

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.

unexpand doesn't format/align texts in file for output purpose. it just converts spaces to tabs in source file. It only converts every letter/word/space which has a total width of 8 (default) with leading whitespace. Rest of the whitespaces are not changed.

Some possible situations where unexpand can be used could be:

You are using some application which recognises tabs for whatever reason and so you want to replace spaces with tabs in files.

Still, like Firerat, I'm not sure where this command comes in handy. But then again, I've never been a fan of tabs and if possible I always change them to spaces. Maybe if one works a lot with tabs a practical use becomes obvious.

David MacKenzie must have had a reason, otherwise he wouldn't have written it

One situation where it comes handy is, which i wished i knew then was, few years back when i was doing a project on bank, i had to regularly convert database to text file format, so that i can send copy of them through internet from regional office to head office since they had no software integration. Those text files were in several hundred of lines and each column of width from 10 to 30 spaces (no tabs). That made file size bulky and took long time to send (dial-up network). I could have applied unexpand to make file size small. But again, it was on windows xp. i didn't knew anything about linux then .