1.使用whereis 查找 locate命令
使用which查找whereis命令
使用locate查找rm命令
[luoxiao0576@localhost ~]$ locate -c rm
locate: can not stat () `/var/lib/mlocate/mlocate.db': No such file or directory
0
[luoxiao0576@localhost ~]$ whereis locate
locate: /usr/bin/locate /usr/share/man/man1/locate.1.gz
[luoxiao0576@localhost ~]$ which whereis
/usr/bin/whereis
2.find命令使用:
使用find命令在当前路径下查找所有的普通文件
使用find命令查找当前路径下的file1.txt,file2.txt,file3.txt
使用find命令查找文件所有者为root的普通文件
使用find命令查找修改时间在1天以内的普通文件
[luoxiao0576@localhost ~]$ find -type f
[luoxiao0576@localhost ~]$ find -type l
[luoxiao0576@localhost ~]$ find find_test1 find_test2 find_test3
find: ‘find_test1’: No such file or directory
find: ‘find_test2’: No such file or directory
find: ‘find_test3’: No such file or directory
[luoxiao0576@localhost ~]$ find -user root | -type l
[luoxiao0576@localhost ~]$ find -mtime -1 | -type l
3.cut命令使用:
给定文件cut_data.txt且内容为:
4.uniq命令使用: 新建文件uniq_data.txt,文件内容为
5.sort命令:给定文件 num.txt, args.txt
文件内容:num.txt
6.将26个小写字母的后13个字母替换成大写字母
将hello 123 world 456中的数字替换成空字符(提示使用通配符)
将hello 123 world 456中字母和空格替换掉,只保留数字(提示使用通配符)
7.wc命令使用:
给定文件:word_count.txt,里面填充10行内容
按字节去统计
按单词去统计
按行去统计