UNEXPAND(1)

๐ŸŒธ NAME ๐ŸŒธ

okay so hi bestie, welcome to unexpand ๐Ÿ’– this little icon lives in the User Commands part of the manual (that's the (1) in unexpand(1), iykyk), and its whole entire personality is: convert spaces to tabs. that's it. that's the job. slay.


โœจ SYNOPSIS โœจ

unexpand [OPTION]... [FILE]...

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

So what it does is: it converts the blanks in each FILE into tabs, and writes the result to standard output. lowkey elegant, ngl.

If you give it no FILE at all, or if FILE is -, it reads from standard input. yes bestie, the classic - means stdin move ๐Ÿซถ

Also, mandatory arguments to long options are mandatory for short options too. that's just how it is, periodt.

Here's the whole menu of options, and you already know I'm not skipping a single one:

  • -a, --all โ€” converts all the blanks, instead of just the initial ones. go big or go home energy ๐Ÿ”ฅ
  • --first-only โ€” converts only leading sequences of blanks (and yes, this overrides -a. it said "not today" ๐Ÿ’…)
  • -t, --tabs=N โ€” have tabs N characters apart instead of 8 (heads up: this enables -a)
  • -t, --tabs=LIST โ€” use a comma separated list of tab positions. the last specified position can be prefixed with / to specify a tab size to use after the last explicitly specified tab stop. also a prefix of + can be used to align remaining tab stops relative to the last specified tab stop instead of the first column. very customizable, very main character โœจ
  • --help โ€” display this help and exit
  • --version โ€” output version information and exit
ngl the two -t forms share the same flag but mean different things depending on what you hand them, so vibe check your arguments before you commit ๐Ÿ˜ญ

๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

Written by David MacKenzie. shoutout to David, actual legend, we love him ๐Ÿ’œ


๐Ÿ› REPORTING BUGS ๐Ÿ›

Found something cursed? tell the people:


Copyright ยฉ 2026 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.

This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

read that again bestie: NO WARRANTY. to the extent permitted by law. it's giving "you're on your own but lovingly" ๐Ÿ™ˆ

๐ŸŒˆ SEE ALSO ๐ŸŒˆ


and that's the whole page, bestie ๐Ÿ’– this was GNU coreutils 9.12, dated September 2026, from the UNEXPAND(1) page โ€” go forth and tab responsibly, mwah ๐ŸŽ€โœจ

๐Ÿ“ฆ where this page comes from