history -c是把缓存的历史命令直接写入~/.bash_history。
举一反三
- 有些时候我们需要查看我们执行的历史命令,使用哪个命令可以查看我们在终端执行的历史命令() A: history B: cat.history C: cat/history D: cat/root/history
- 智慧职教: 直接执行history命令,默认情况下最多可以显示1000条历史命令。
- 以下哪条命令搜索用户的.bash_history文件以确定该用户是否使用过sudo命令? A: find /home -name "bash_history" | grep sudo B: find /home -name ".bash_history" | xargs grep sudo C: find /home/.bash_history | xargs grep sudo D: find /home -type history | xargs grep sudo
- history命令可以查看命令历史,!!可以执行上一次执行的命令
- 什么是历史地理?( ) A: Geography B: History C: History and geography D: Historical geography