LoginSignup
3

More than 5 years have passed since last update.

cat コマンド

Last updated at Posted at 2014-02-16

由来:「concatenate」一群の資料を一緒にまとめる

複数ファイルを読む

/etc (456) $ ls {syslog,nfs,ftpd}.conf
ftpd.conf   nfs.conf    syslog.conf
/etc (457) $ cat notify.conf
#
# Notification Center configuration file
#

reserve com.apple.system. 0 0 rwr-r-
monitor com.apple.system.timezone /etc/localtime
monitor com.apple.system.info:/etc/hosts /etc/hosts
monitor com.apple.system.info:/etc/services /etc/services

オプション

  • -n オプション 行番号
/etc (461) $ cat -n {syslog,nfs,ftpd}.conf
     1  # Note that flat file logs are now configured in /etc/asl.conf
     2
     3  install.*                       @127.0.0.1:32376
     1  #
     2  # nfs.conf: the NFS configuration file
     3  #
     1  # match umask from Mac OS X Server ftpd
     2  umask all 022
/etc (462) $
  • -v オプション タブや改行など画面に表示できない文字を目に見える形で表示する

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3