CUT(1)

πŸ“¦ version 0.12.0, in arch rolling

πŸ’– cut(1) β€” the General Commands Manual's own slicing queen πŸ’–

okay so bestie, welcome to cut(1), straight out of the General Commands Manual ✨ this is the little tool that takes every line of your files and, like, cuts the parts you want out of them. no cap, it's iconic.


🌸 NAME 🌸

cut β€” extract sections from each line of files. that's it. that's the whole job. she does one thing and she ate πŸ’…


✨ SYNOPSIS ✨

cut OPTION... [FILE]...

like, give her some options and maybe some files and she'll handle it 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

extract sections from each line of files. literally her whole personality πŸ’– you point at the columns you want, she hands them over, everybody's happy.


πŸŽ€ OPTIONS πŸŽ€

so here's the menu, bestie β€” pick your fighter πŸ‘‘

  • -b, --bytes <LIST> β€” extract the bytes listed in LIST. byte by byte, she's precise like that πŸ“
  • -c, --characters <LIST> β€” extract the characters listed in LIST. character girlies rise 🌸
  • -d, --delimiter <DELIM> β€” use DELIM as the field separator (default: Tab). yes bestie, Tab is the default, she's classy like that πŸ’…
  • -w, --whitespace-delimited[=<trimmed>] β€” use any whitespace (Space/Tab) as the delimiter. and if you pass trimmed, she also ignores leading and trailing blanks 🧚 the only possible value is:
    • trimmed
  • -f, --fields <LIST> β€” extract the fields listed in LIST. the classic. the main character πŸ‘‘
  • -F <LIST> β€” like -f, but she merges adjacent delimiters, and the delimiter defaults to whitespace while the output delimiter defaults to a space. lowkey a whole different vibe πŸ”₯
  • --complement β€” invert the selection: print all the columns except the ones you specified. the "not you" of it all πŸ’€
  • -s, --only-delimited β€” suppress lines that don't contain the delimiter. if you're not delimited you're not invited πŸ™ˆ
  • -z, --zero-terminated β€” use NULL (\0) instead of newline as the line terminator. for when newlines are just too mainstream ⭐
  • -O, --output-delimiter <NEW_DELIM> β€” replace the input delimiter with NEW_DELIM in the output. glow-up for your separators ✨
  • -n, --no-partial β€” with -b, do not output partial multi-byte characters. no half-finished characters on her watch πŸŽ€
  • -h, --help β€” print help 🫢
  • -V, --version β€” print version πŸ’œ

🌈 EXTRA 🌈

if no FILE is specified, she reads from stdin β€” no big deal, she's flexible like that. and you can use '-' as a FILE argument to include stdin too πŸ’–

LIST is a comma-separated list of numbers or ranges, iykyk:

  N           only column N
  N-          columns N through the end of the line
  N-M         columns N through M
  -M          columns 1 through M

examples, because seeing it > reading it, fr fr:

  • cut -f 2,5-7 file.txt β€” extract fields 2, 5, 6, and 7
  • cut -f 3- file.txt β€” extract field 3 to the end of the line
  • cut --complement -f 4-6 file.txt β€” extract all fields except 4, 5, and 6
  • cut -d',' -f1 file.csv β€” extract first field from a CSV
bestie listen β€” ranges are inclusive of both ends for N-M, and the open-ended ones do exactly what they say. don't come for me if you typo your LIST, that's on you πŸ™ˆ

⭐ VERSION ⭐

v(uutils coreutils) 0.12.0


aaaand that's the page!! this cut(1) moment was served to you by v(uutils coreutils) 0.12.0, dated 2026-09-17, from the General Commands Manual β€” slay, go slice something, ily, bye πŸ‘‘πŸ’–πŸ¦‹

πŸ“¦ where this page comes from