Linux

sudo apt-get install npm
sudo npm install -g grunt-cli
sudo npm install -g bower

将所有执行过的命令写入history.txt文件中
n 显示n个最近的记录
-w <文件> 覆盖原有文件或者将记录写入一个新文件
$ history -w history.txt 或者
$ history -w & cp ~/.bash_history history.txt

Linux下history命令用法


http://blog.sina.com.cn/s/blog_5caa94a00100gyls.html
原文地址:https://www.cnblogs.com/kangping/p/6097633.html