以下哪条命令搜索用户的.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
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
举一反三
- 下面哪条命令可以查询MySQL状态,测试MySQL安装正确性 A: sudo netstat -tap | grep mysql; B: sudo netstat -tap | grep mysql-server; C: sudo netstat -tap | grep server-mysql; D: sudo netstat -tap | grep mysql-client;
- 在linux 系统中,你想要搜索/home 下的所有的目录文件,下面哪个命令是正确的? A: find /home -type d B: find -type d /home C: find -name d /home D: find -name l /home
- history -c是把缓存的历史命令直接写入~/.bash_history。
- 以下查找文件的命令中哪个是错误? A: find –name “myfile” B: find –size 100k C: find /home –name “myfile” D: find –type myfile
- Ubuntu中启用root用户,设置root用户密码的命令是 A: sudo pass B: sudo word C: sudo passwd D: sudo password