linux命令之diff,whereis,locate,pwd,cat,grep,touch,find
来源:互联网 发布:python 指定路径模块 编辑:程序博客网 时间:2024/06/11 09:49
最近学到的linux命令,算是每天学一个,但是感觉每天都在忘。。。所以就只能重复的看了,在此分享给大家。与君共勉。
1、diff::比较给定的两个文件的不同 diff /usr/li test.txt #比较当前目录下的test.txt文件与/usr/li下的test.txt文件的差异
2、 whereis::只能用于程序名的搜索,而且只搜索二进制文件(参数-b)、man说明文件(参数-m)和源代码文件(参数-s)。
3、 locate::命令和slocate命令都用来查找文件或目录。可以在使用locate之前,先使用updatedb命令,手动更新数据库。 locate /etc/sh(搜索/etc目录下所有sh开头的)
4、 pwd::输入pwd命令,Linux会输出当前目录的绝对路径。
5、 cat::cat命令可以用来合并文件,也可以用来在屏幕上显示整个文件的内容。 cat snow.txt 该命令显示文件snow.txt的内容,ctrl+D退出cat。
例如:cat m1 m2 (同时显示文件ml和m2的内容) cat m1 m2 > file (将文件ml和m2合并后放入文件file中)
6、 grep::grep命令的最大功能是在一堆文件中查找一个特定的字符串。 grep money test.txt 以上命令在test.txt中查找money这个字符串,grep查找是区分大小写的。
7、 touch::touch命令用来创建新文件或者把已存在文件的时间标签更新为系统当前的时间(默认方式),他可以创建一个空白的文件,可以在其中添加文本和数据。 touch newfile 该命令创建一个名为newfile的空白文件。
8、 find::find / -name tnsnames.ora :代表在根目录“/”下,查找名字为tnsnames.ora的文件,返回该文件的绝对路径。 find /var/www -name wx :代表在"/var/www"目录下,查找文件名"wx"的文件位置。
排版有点乱,这是之前写在记事本上的,直接复制粘贴,,顺便自己也再看一遍
end
- linux命令之diff,whereis,locate,pwd,cat,grep,touch,find
- Linux 搜索命令(locate/find/whereis/which/grep)
- linux命令:文件搜索(locate、whereis、which、find、grep)
- Linux常用命令002之搜索命令locate、whereis、which、find、grep
- Linux常用命令002之搜索命令locate、whereis、which、find、grep
- find locate which whereis grep 命令
- linux常用命令(locate,whereis,which,find,grep)
- Linux :grep find locate whereis which
- linux常见命令(which,whereis,locate,find)
- linux 命令 which whereis find locate
- Linux命令-find whereis locate 区别
- linux查找命令which、whereis、locate、find
- Linux下的五个查找命令:grep、find、locate、whereis、which
- linux 查找命令(find which whereis grep locate type)
- Linux下的五个查找命令:grep、find、locate、whereis、which
- Linux下的五个查找命令:grep、find、locate、whereis、which
- Linux下的五个查找命令:grep、find、locate、whereis、which
- Linux下的五个查找命令:grep、find、locate、whereis、which
- 21. Merge Two Sorted Lists
- 第22讲:函数:递归是神马
- Matlab二维绘图---plot函数详解
- PHP的AOP实现
- 算法导论第二章
- linux命令之diff,whereis,locate,pwd,cat,grep,touch,find
- java基础语句
- 雷德算法
- Python3__类(一本正经瞎忽悠系列)
- 转发和重定向
- Service 使用方法详解
- BZOJ 3470 Freda’s Walk (期望)
- OpenCV3.3+contrib+VS2017+CMake+Win10
- Android XML Editor cannot process this input