1.删除当前目录所有txt文件,不递归子文件—maxdepth :find -maxdepth 1 -name "*.txt" -exec rm -f '{}' \;
2. 删除指定后缀文件:rm –f *.png
3. 统计某个文件字节数: wc 文件名
- 语法:wc [-clw][--help][--version][文件...]
- -c或--bytes或--chars 只显示Bytes数。
- -l或--lines 只显示行数。
- -w或--words 只显示字数。
- --help 在线帮助。
- --version 显示版本信息。
Eg: $ wc testfile # testfile文件的统计信息 3 92 598 testfile # testfile文件的行数为3、单词数92、字节数598
4.查看指定用户进程:top -U xxx (xxx是用户名)。
5.查看ubuntu版本:cat /etc/issue
6.查看opencv版本:pkg-config --modversion opencv