1、echo是内部命令还是外部命令?其作用是什么?如何显示“the year is 2016.Today is 10yue 26”为两行?
通过type命令可知echo是内部命令:
[root@xuelinux ~]# type echo
echo is a shell builtin
echo作用:直接显示输入的内容。
echo -e "the year is 2016. \n today is 7."
[root@xuelinux ~]# echo -e "The year is 2016. \nToday is 7."
The year is 2016.
Today is 7.
2、printf是内部命令还是外部命令?其作用是什么?如何显示“the year is 2016.Today is 10yue 26”为两行?
通过type命令可知printf是内部命令:
[root@xuelinux ~]# type printf
printf is a shell builtin
printf作用:格式并显示输入的内容。
printf "the year is 2016. \n today is 7."
[root@xuelinux ~]# printf "The year is 2016.Today is 7.\n"
The year is 2016.Today is 7.
[root@xuelinux ~]#
3、file命令使用及用法
man file determine file type 确定文件类型
eg: file /bin/ls
file 绝对路径
本文出自 “学linux历程” 博客,请务必保留此出处http://woyaoxuelinux.blog.51cto.com/5663865/1859079
原文地址:http://woyaoxuelinux.blog.51cto.com/5663865/1859079