CUT(1)

๐Ÿ’– CUT(1) ๐Ÿ’–

okay bestie, welcome to cut โ€” the manual page, but make it a group chat ๐Ÿซถ it lives in the User Commands section of the manual, and it's about to become your main character tool for slicing up text. no cap.


โœจ NAME โœจ

cut โ€” remove sections from each line of files ๐Ÿ’…


โœจ SYNOPSIS โœจ

cut OPTION... [FILE]...

โœจ DESCRIPTION โœจ

so basically? it prints the selected parts of lines from each FILE to standard output. that's the whole vibe. ๐ŸŽ€

and if you give it no FILE at all โ€” or if FILE is literally just - โ€” it reads from standard input instead. periodt.

ngl, a lil heads up: mandatory arguments to long options are also mandatory for short options too. the rules apply both ways, fr fr.

๐ŸŒธ OPTIONS ๐ŸŒธ

  • -b, --bytes=LIST โ€” only pick these byte positions ๐Ÿ’–
  • -c, --characters=LIST โ€” only pick these character positions โœจ
  • --complement โ€” flip it, reverse it: take the complement of the set of selected bytes, characters, or fields ๐Ÿฆ‹
  • -d, --delimiter=DELIM โ€” use DELIM as the field delimiter instead of TAB ๐Ÿ’…
  • -f, --fields=LIST โ€” only pick these fields; it'll also print any line that contains no delimiter character, unless you specified the -s option ๐Ÿ‘€
  • -F LIST โ€” same energy as -f, but it also implies -w and -O ' ' ๐Ÿ”ฅ
  • -n, --no-partial โ€” with -b, do not output partial multi-byte characters. we do not do half-characters here, it's giving incomplete ๐Ÿ˜ญ
  • -O, --output-delimiter=STRING โ€” use STRING as the output delimiter; the default is to just reuse the input delimiter ๐ŸŒˆ
  • -s, --only-delimited โ€” do not print lines that don't contain delimiters ๐Ÿšซ
  • -w, --whitespace-delimited[=trimmed] โ€” use a run of blank characters as the field delimiter; with 'trimmed', ignore leading and trailing blanks ๐Ÿงš
  • -z, --zero-terminated โ€” line delimiter is NUL, not newline. iconic little \0 moment ๐Ÿ’€
  • --help โ€” display this help and exit ๐Ÿซถ
  • --version โ€” output version information and exit โญ

๐ŸŽ€ THE LIST RULES ๐ŸŽ€

Use one, and only one of -b, -c, -f or -F. choose your fighter, bestie, you can't have all four ๐Ÿ˜ค

each LIST is made up of one range, or many ranges separated by commas.

selected input gets written in the same order that it is read, and it's written exactly once. no duplicates, no reshuffling. obsessed. ๐Ÿ’œ

each range is one of these:

  • N โ€” the N'th byte, character or field, counted from 1
  • N- โ€” from the N'th byte, character or field, all the way to the end of line
  • N-M โ€” from the N'th to the M'th (included) byte, character or field
  • -M โ€” from the first to the M'th (included) byte, character or field

โœจ AUTHOR โœจ

Written by David M. Ihnat, David MacKenzie, and Jim Meyering. kings. ๐Ÿ‘‘


๐Ÿฆ‹ REPORTING BUGS ๐Ÿฆ‹


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. like, zero. none. don't come for them ๐Ÿ˜ญ

๐Ÿ’œ SEE ALSO ๐Ÿ’œ


okay that's the whole thing!! this page is from GNU coreutils 9.12, dated September 2026, and it's page CUT(1) in the manual ๐Ÿ’– go forth and slice, bestie โ€” you got this fr fr ๐ŸŒธโœจ๐Ÿซถ

๐Ÿ“ฆ where this page comes from