
私はOracle Linuxを使用しています。
[root@ol76 systemd]# cat /etc/*release*
Oracle Linux Server release 7.6
NAME="Oracle Linux Server"
VERSION="7.6"
ID="ol"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.6"
PRETTY_NAME="Oracle Linux Server 7.6"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:7:6:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://bugzilla.oracle.com/"
ORACLE_BUGZILLA_PRODUCT="Oracle Linux 7"
ORACLE_BUGZILLA_PRODUCT_VERSION=7.6
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=7.6
Red Hat Enterprise Linux Server release 7.6 (Maipo)
Oracle Linux Server release 7.6
cpe:/o:oracle:linux:7:6:server
[root@ol76 systemd]#
結果がls
強調表示されているがdir
強調表示されないのはなぜですか?
答え1
からdir --help
:
--color=never
デフォルトでは、カラーコード--color=auto
は標準出力が端末に接続ls
されている場合にのみ表示されます。環境LS_COLORS
変数は設定を変更できます。コマンドでdircolors
設定します。