Forrest logo
tool overview
On this page you find all important commands for the CLI tool cat. If the command you are looking for is missing please ask our AI.

cat

cat is a standard Unix utility that reads files sequentially, writing them to standard output. The name is derived from its function to (con)catenate files (from Latin catenare, "to chain"). It has been ported to a number of operating systems.

List of commands for cat:

  • ajson:tldr:d0404 ajson: Read JSON from `stdin` and execute a specified JSONPath expression.
    $ cat ${filename-json} | ajson '${$--json[?(@-path)]}'
    try on your machine
    explain this command
  • aspell:tldr:00691 aspell: List misspelled words from standard input.
    $ cat ${filename} | aspell list
    try on your machine
    explain this command
  • aspell:tldr:47bf9 aspell: List misspelled words from standard input and ignore words from personal word list.
    $ cat ${filename} | aspell --personal=${personal-word-list-pws} list
    try on your machine
    explain this command
  • bzgrep:tldr:c4838 bzgrep: Search `stdin` for lines that do not match a pattern.
    $ cat ${-path-to-bz-compressed-file} | bzgrep --invert-match "${search_pattern}"
    try on your machine
    explain this command
  • cat:tldr:0522f cat: Concatenate several files into an output file.
    $ cat ${filename1 filename2 ---} > ${path-to-output_file}
    try on your machine
    explain this command
  • cat:tldr:1d41f cat: Copy the contents of a file into an output file without buffering.
    $ cat -u ${-dev-tty12} > ${-dev-tty13}
    try on your machine
    explain this command
  • cat:tldr:346b1 cat: [n]umber all output lines.
    $ cat -n ${filename}
    try on your machine
    explain this command
  • cat:tldr:4b4b4 cat: Display non-printable and whitespace characters (with `M-` prefix if non-ASCII).
    $ cat -v -t -e ${filename}
    try on your machine
    explain this command
  • cat:tldr:f21eb cat: Append several files to an output file.
    $ cat ${filename1 filename2 ---} >> ${path-to-output_file}
    try on your machine
    explain this command
  • egrep:tldr:7a42d egrep: Search `stdin` for a pattern.
    $ cat ${filename} | egrep ${search_pattern}
    try on your machine
    explain this command
  • file_manipulation:warp:4ff5b Sort a file by line length
    $ cat ${file_name} | awk '{ print length, $0 }' | sort -n -s | cut -d" " -f2-
    try on your machine
    explain this command
  • git-hash-object:tldr:ced42 git-hash-object: Compute the object ID from `stdin`.
    $ cat ${filename} | git hash-object --stdin
    try on your machine
    explain this command
  • git-stripspace:tldr:3e6dc git-stripspace: Trim whitespace from a file.
    $ cat ${filename} | git stripspace
    try on your machine
    explain this command
  • git-stripspace:tldr:52924 git-stripspace: Trim whitespace and Git comments from a file.
    $ cat ${filename} | git stripspace --strip-comments
    try on your machine
    explain this command
  • gml2gv:tldr:45857 gml2gv: Convert a graph using `stdin` and `stdout`.
    $ cat ${input-gml} | gml2gv > ${output-gv}
    try on your machine
    explain this command
  • graphml2gv:tldr:cc563 graphml2gv: Convert a graph using `stdin` and `stdout`.
    $ cat ${input-gml} | graphml2gv > ${output-gv}
    try on your machine
    explain this command
  • grep:tldr:cc5bb grep: Search `stdin` for lines that do not match a pattern.
    $ cat ${filename} | grep --invert-match "${search_pattern}"
    try on your machine
    explain this command
  • gunzip:tldr:b255c gunzip: Decompress an archive from `stdin`.
    $ cat ${path-to-archive-gz} | gunzip
    try on your machine
    explain this command
  • gv2gml:tldr:67165 gv2gml: Convert a graph using `stdin` and `stdout`.
    $ cat ${input-gv} | gv2gml > ${output-gml}
    try on your machine
    explain this command
  • gv2gxl:tldr:4995c gv2gxl: Convert a graph using `stdin` and `stdout`.
    $ cat ${input-gv} | gv2gxl > ${output-gxl}
    try on your machine
    explain this command
  • gxl2gv:tldr:2fb6e gxl2gv: Convert a graph using `stdin` and `stdout`.
    $ cat ${input-gxl} | gxl2gv > ${output-gv}
    try on your machine
    explain this command
  • http:tldr:5131c http: Specify raw request body via `stdin`.
    $ cat ${data-txt} | http PUT ${example-org}
    try on your machine
    explain this command
  • httprobe:tldr:32308 httprobe: Probe a list of domains from a text file.
    $ cat ${input_file} | httprobe
    try on your machine
    explain this command
  • httprobe:tldr:8d8ad httprobe: Probe additional ports with a given protocol.
    $ cat ${input_file} | httprobe -p ${https:2222}
    try on your machine
    explain this command
  • httprobe:tldr:e29d6 httprobe: Only check for HTTP if HTTPS is not working.
    $ cat ${input_file} | httprobe --prefer-https
    try on your machine
    explain this command
  • in2csv:tldr:a04a5 in2csv: Pipe a JSON file to in2csv.
    $ cat ${data-json} | in2csv -f json > ${data-csv}
    try on your machine
    explain this command
  • jello:tldr:00951 jello: Pretty-print JSON or JSON-Lines data from `stdin` to `stdout`.
    $ cat ${file-json} | jello
    try on your machine
    explain this command
  • jello:tldr:11dbe jello: Output all elements from arrays (or all the values from objects) in JSON or JSON-Lines data from `stdin` to `stdout`.
    $ cat ${file-json} | jello -l
    try on your machine
    explain this command
  • jello:tldr:1a000 jello: Output the value of a given key to a string (and disable JSON output).
    $ cat ${file-json} | jello -r '"${some text}: " + _.${key_name}'
    try on your machine
    explain this command
  • jello:tldr:33ed9 jello: Output the value of multiple keys as a new JSON object (assuming the input JSON has the keys `key_name` and `other_key_name`).
    $ cat ${file-json} | jello '{"${my_new_key}": _.${key_name}, "${my_other_key}": _.${other_key_name}}'
    try on your machine
    explain this command
  • jello:tldr:4a099 jello: Output the first element in JSON or JSON-Lines data from `stdin` to `stdout`.
    $ cat ${file-json} | jello _[0]
    try on your machine
    explain this command
  • jello:tldr:5cc94 jello: Output a schema of JSON or JSON Lines data from `stdin` to `stdout` (useful for grep).
    $ cat ${file-json} | jello -s
    try on your machine
    explain this command
  • jello:tldr:b9cf0 jello: Output the value of a given key of each element in JSON or JSON-Lines data from `stdin` to `stdout`.
    $ cat ${file-json} | jello '[i.${key_name} for i in _]'
    try on your machine
    explain this command
  • jtbl:tldr:0c626 jtbl: Print a table and specify the column width for wrapping.
    $ cat ${file-json} | jtbl --cols=${width}
    try on your machine
    explain this command
  • jtbl:tldr:14b38 jtbl: Print a table and truncate rows instead of wrapping.
    $ cat ${file-json} | jtbl -t
    try on your machine
    explain this command
  • jtbl:tldr:18569 jtbl: Print a table from JSON or JSON Lines input.
    $ cat ${file-json} | jtbl
    try on your machine
    explain this command
  • jtbl:tldr:d0b60 jtbl: Print a table and don't wrap or truncate rows.
    $ cat ${file-json} | jtbl -n
    try on your machine
    explain this command
  • kate:tldr:85c4c kate: Create a file from `stdin`.
    $ cat ${filename} | kate --stdin
    try on your machine
    explain this command
  • linux:file:length Return the number of lines of a given file.
    $ cat ${filename} | wc -l
    try on your machine
  • linux:linux:file:show Show the content of a file.
    $ cat ${filename}
    try on your machine
  • linux:version:info Show information about the Linux version
    $ cat /etc/os-release
    try on your machine
  • llvm-as:tldr:5a295 llvm-as: Read an IR file from `stdin` and assemble it.
    $ cat ${path-to-source-ll} | llvm-as -o ${path-to-out-bc}
    try on your machine
    explain this command
  • llvm-bcanalyzer:tldr:b8f20 llvm-bcanalyzer: Read a Bitcode file from `stdin` and analyze it.
    $ cat ${filename-bc} | llvm-bcanalyzer
    try on your machine
    explain this command
  • mm2gv:tldr:3a9dd mm2gv: Convert a graph using `stdin` and `stdout`.
    $ cat ${input-mm} | mm2gv > ${output-gv}
    try on your machine
    explain this command
  • mpg123:tldr:3c26e mpg123: Play the mp3 from `stdin`.
    $ cat ${file-mp3} | mpg123 -
    try on your machine
    explain this command
  • nl:tldr:1ffad nl: Read from standard output.
    $ cat ${filename} | nl ${options} -
    try on your machine
    explain this command
  • nms:tldr:3babe nms: Decrypt the content of a file, with a custom output color.
    $ cat ${filename} | nms -a -f ${select}
    try on your machine
    explain this command
  • parallel:tldr:86451 parallel: Break `stdin` into ~1M blocks, feed each block to `stdin` of new command.
    $ cat ${big_file-txt} | parallel --pipe --block 1M ${command}
    try on your machine
    explain this command
  • perl:tldr:d4051 perl: Run a regular [e]xpression on `stdin`, printing matching [l]ines.
    $ cat ${filename} | perl -n -l -e 'print if /${regular_expression}/'
    try on your machine
    explain this command
  • perl:tldr:f3210 perl: Run a regular [e]xpression on `stdin`, printing only the first capture group for each matching [l]ine.
    $ cat ${filename} | perl -n -l -e 'print $1 if /${before}(${regular_expression})${after}/'
    try on your machine
    explain this command
  • pngcheck:tldr:5b897 pngcheck: Receive an image from `stdin` and display detailed information.
    $ cat ${path-to-image-png} | pngcheck -cvt
    try on your machine
    explain this command
  • pup:tldr:1100e pup: Print all text from the filtered HTML elements and their children.
    $ cat ${index-html} | pup '${div} text{}'
    try on your machine
    explain this command
  • pup:tldr:49a24 pup: Print HTML as JSON.
    $ cat ${index-html} | pup '${div} json{}'
    try on your machine
    explain this command
  • pup:tldr:58997 pup: Transform a raw HTML file into a cleaned, indented, and colored format.
    $ cat ${index-html} | pup --color
    try on your machine
    explain this command
  • pup:tldr:8575a pup: Filter HTML by element tag name.
    $ cat ${index-html} | pup '${tag}'
    try on your machine
    explain this command
  • sponge:tldr:6b029 sponge: Append file content to the source file.
    $ cat ${filename} | sponge -a ${filename}
    try on your machine
    explain this command
  • textql:tldr:6bc5e textql: Read data from `stdin`.
    $ cat ${filename} | textql -sql "${SELECT * FROM stdin}"
    try on your machine
    explain this command
  • tlmgr-key:tldr:c33bb tlmgr-key: Add a key from `stdin`.
    $ cat ${path-to-key-gpg} | sudo tlmgr key add -
    try on your machine
    explain this command
  • ts:tldr:442f8 ts: Convert existing timestamps in a text file (eg. a log file) into [r]elative format.
    $ cat ${filename} | ts -r
    try on your machine
    explain this command
  • unzipsfx:tldr:510f2 unzipsfx: Create a self-extracting binary file of a `zip` archive.
    $ cat unzipsfx ${path-to-archive-zip} > ${filename} && chmod 755 ${filename}
    try on your machine
    explain this command
  • vale:tldr:89b99 vale: Check the style from `stdin`, specifying markup format.
    $ cat ${file-md} | vale --ext=.md
    try on your machine
    explain this command
  • xauth:tldr:8a61e xauth: Merge the authorization entries from a specific file into the authorization database.
    $ cat ${filename} | xauth merge -
    try on your machine
    explain this command
  • xml-depyx:tldr:17600 xml-depyx: Convert a PYX document from `stdin` to XML format.
    $ cat ${path-to-input-pyx} | xml depyx > ${path-to-output-xml}
    try on your machine
    explain this command
  • xml-format:tldr:c7315 xml-format: Format an XML document from `stdin`, removing the `DOCTYPE` declaration.
    $ cat ${path\to\input-xml} | xml format --dropdtd > ${path-to-output-xml}
    try on your machine
    explain this command
  • xml-pyx:tldr:35ca1 xml-pyx: Convert an XML document from `stdin` to PYX format.
    $ cat ${path-to-input-xml} | xml pyx > ${path-to-output-pyx}
    try on your machine
    explain this command
  • xsel:tldr:9eff6 xsel: Use the contents of a file as input of the clipboard.
    $ cat ${filename} | xsel -ib
    try on your machine
    explain this command
  • zek:tldr:1c7c0 zek: Generate an example Go program from a given XML from `stdin` and send output to a file.
    $ cat ${path-to-input-xml} | zek -p -o ${path-to-output-go}
    try on your machine
    explain this command
  • zek:tldr:90ae2 zek: Generate a Go struct from a given XML from `stdin` and display output on `stdout`.
    $ cat ${path-to-input-xml} | zek
    try on your machine
    explain this command
tool overview