EXPAND(1)

๐Ÿ’– EXPAND(1) ๐Ÿ’–

okay so bestie, you know that one manual page called expand? It's from the User Commands corner of the man-page universe, and honestly it's giving โœจquiet luxuryโœจ โ€” tiny, useful, no drama. Let's get into it ๐ŸŽ€


๐ŸŒธ NAME ๐ŸŒธ

expand โ€” convert tabs to spaces. That's it. That's the whole job. And she does it flawlessly ๐Ÿ’…


โœจ SYNOPSIS โœจ

expand [OPTION]... [FILE]...

literally just toss some options and some files at her and she goes ๐Ÿฆ‹


๐Ÿ’œ DESCRIPTION ๐Ÿ’œ

She takes every tab inside each FILE and turns it into spaces, then writes the whole glow-up to standard output. No cap.

If you don't give her any FILE, or if FILE is -, she reads from standard input instead. She's flexible like that ๐Ÿซถ

Real talk: mandatory arguments for long options are also mandatory for the short ones. The = is not decorative, bestie, it's the rules ๐Ÿ˜ญ

๐ŸŽ€ the options ๐ŸŽ€

  • -i, --initial โ€” do not convert tabs that come after non-blank characters. Leave those tabs alone, she said ๐Ÿ’…
  • -t, --tabs=N โ€” make tabs N characters apart instead of the usual 8. Custom spacing, main character energy ๐Ÿ‘‘
  • -t, --tabs=LIST โ€” now we're fancy: give her a comma separated list of tab positions. A few extra rules come with the vibes:
    • the last specified position can be prefixed with / โ€” that sets a tab size to use after the last explicitly specified tab stop ๐ŸŒธ
    • a prefix of + can be used to align the remaining tab stops relative to the last specified tab stop instead of the first column ๐Ÿงš
  • --help โ€” display this help and exit. She'll tell you everything she knows, and she knows a lot ๐Ÿ’–
  • --version โ€” output version information and exit. Iconic queen behavior, showing her credentials โญ

๐Ÿฆ‹ AUTHOR ๐Ÿฆ‹

Written by David MacKenzie. Legend behavior, fr fr ๐Ÿ™Œ


๐ŸŒˆ REPORTING BUGS ๐ŸŒˆ

Found a bug? Not her fault, but tell the team anyway bestie:


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. (Say it with me: no warranty, no cap ๐Ÿ˜ค)


โญ SEE ALSO โญ


and that's the whole page, bestie ๐Ÿซถ this was GNU coreutils 9.12, dated September 2026, and yes she really is just a little tab-to-space machine with impeccable taste. go convert something, ily ๐Ÿ’–โœจ๐ŸŽ€

๐Ÿ“ฆ where this page comes from