shell命令

$ echo 'Hello world' > abc.txt

清空abc.txt内容并将hello world 输入到abc.txt。

$ echo 'Hello world' >> abc.txt

在abc.txt文件后追加Hello world内容。

$ cat abc.txt

在shell界面输出abc.txt文件的所有内容。

$ cat -n abc.txt

在shell界面输出abc.txt文件所有内容。显示对应行号。

$ touch hello.txt

创建hello.txt文件。

$ cat abc.txt >> hello.txt

把abc.txt内容追加到hello.txt文件里。

$ mkdir test //创建名字为test的文件夹
posted @ 2017-01-22 23:09  iwang5566  阅读(146)  评论(0编辑  收藏  举报