Thursday 17, Apr 2025
We are moved to new domain
Click -> www.ehowtonow.com
Tuesday, 11 July 2017

Cat Content of file(s) Linux Command

cat

cat [options] [files]

Description

Read (concatenate) one or more files and print them on standard output. Read standard input if no files are specified or if - is specified as one of the files; input ends with EOF. You can use the > operator to combine several files into a new file, or >> to append files to an existing file. When appending to an existing file, use Ctrl-D, the end-of-file symbol, to end the session.

Options

-A, --show-all
Same as -vET.

-b, --number-nonblank
Number all nonblank output lines, starting with 1.

-e
Same as -vE.

-E, --show-ends
Print $ at the end of each line.

-n, --number
Number all output lines, starting with 1.

-s, --squeeze-blank
Squeeze down multiple blank lines to one blank line.

-t
Same as -vT.

-T, --show-tabs
Print TAB characters as ^I.

-u
Ignored; retained for Unix compatibility.

-v, --show-nonprinting
Display control and nonprinting characters, with the exception of LINEFEED and TAB.

Examples

cat ch1 Display a file cat ch1 ch2 ch3 > all Combine files cat note5 >> notes Append to a file cat > temp1 Create file at terminal. To exit, enter EOF (Ctrl-D). cat > temp2 << STOP Create file at terminal. To exit, enter STOP.

Reference : http://www.linuxdevcenter.com

Shop and help us

Flipkart Offer Snapdeal offer Amazon.in offer Amazon.com offer

Related Posts:

  • Execute command as the superuser - sudo Linux Command sudo sudo [options] [command] Description If you are allowed, execute command as the superuser. Authorized users of sudo and the commands they are permitted to execute are listed in the sudo configuration file, /etc/sudoe… Read More
  • tar Linux Command tar tar [options] [tarfile] [other-files] Description Copy files to or restore files from an archive medium. If any files are directories, tar acts on the entire subtree. Options need not be preceded by - (though they may… Read More
  • Report on active processes ps Linux Command ps ps [options] Description Report on active processes. ps has three types of options. GNU long options start with two hyphens, which are required. BSD options may be grouped and do not start with a hyphen, while Unix98 o… Read More
  • Switch User su Linux Command su su [option] [user] [shell_args] Description Create a shell with the effective user ID user. If no user is specified, create a shell for a privileged user (i.e., become a superuser). Enter EOF to terminate. You can run … Read More
  • host Linux Command host host [options] name [server] Description System administration command. Print information about hosts or zones in DNS. Hosts may be IP addresses or hostnames; host converts IP addresses to hostnames by default and ap… Read More
  • Blogger Comments
  • Facebook Comments
  • Disqus Comments

0 comments:

Post a Comment

Item Reviewed: Cat Content of file(s) Linux Command Rating: 5 Reviewed By: eHowToNow