1. ?Linux的五个查找命令:find,locate,whereis,which,type?这个你或许会用到,当你的系统里面有多个版本的git的时候,这个可以帮你查看你当前使用的是那个git,这个git在什么位置。 2. git官网这个你也会用得着...
分类:
其他好文 时间:
2014-12-23 12:39:14
阅读次数:
481
默认ssh端口为 22,总是被人扫描登录!
修改默认端口为2218的方法:
修改ssh配置文件 /etc/ssh/sshd_config,将里面的 Port 22前面的注释去掉,将22修改为 2218
[root@niche ~]# whereis ssh
ssh: /usr/bin/ssh /etc/ssh /usr/share/man/man1/ssh.1.gz
[root@...
分类:
其他好文 时间:
2014-12-19 00:42:09
阅读次数:
224
[转]ubuntu(12.04)下, 命令 ,内核 源代码的获取http://blog.chinaunix.net/uid-18905703-id-3446099.html1.命令:例如:要查看ls命令的源代码 1) whereis ls ls: /bin/ls /usr/share/man/man...
分类:
系统相关 时间:
2014-12-17 17:49:13
阅读次数:
151
在linux下面经常用查找命令,我自己最常用的是find whereis locate关于find我常用find的基本功能,如find / -name filename在某个目录下寻找文件。find命令支持正则,可以写成find . -name abc*但是find查找非常慢,而且find查找的内容...
分类:
系统相关 时间:
2014-12-10 00:18:32
阅读次数:
276
时间date 显示当前时间time cmd 显示 cmd的运行时间地点locate 根据文件名,迅速找到文件。基于系统构建的索引find 根据各种规则找到文件,更强大,但比较慢whereis cmd 找到命令所在位置人物whoami 显示当前用户名who 显示登陆到系统的用户w 显示登陆用户,以及....
分类:
系统相关 时间:
2014-11-30 22:51:42
阅读次数:
238
今天遇到几个命令,初见时感觉好像啊,不太能区分其具体功能和区别,因此特来记录一下。1. file和typefile: 查看文件类型type: display information of command type2. which和whereiswhich: 查看可执行文件和别名alias的位置。wh...
分类:
系统相关 时间:
2014-11-18 00:05:26
阅读次数:
319
1、文件搜索命令 which语法:which [命令名称]范例:$which ls 列出ls命令所在目录[chanshuyi@localhost ~]$ which lsalias ls='ls --color=auto' /bin/ls另外一个命令:whereis [名称名称],...
分类:
系统相关 时间:
2014-11-17 22:45:14
阅读次数:
285
我们经常在linux要查找某个文件,但不知道放在哪里了,可以使用下面的一些命令来搜索:
which 查看可执行文件的位置。
whereis 查看文件的位置。
locate 配合数据库查看文件位置。
find 实际搜寻硬盘查询文件名称。...
分类:
系统相关 时间:
2014-11-17 14:07:47
阅读次数:
204
[root@localhost ~]# whereis -b svn
svn: /usr/bin/svn /usr/local/svn
[root@localhost ~]# whereis -m svn
svn: /usr/share/man/man1/svn.1.gz
[root@localhost ~]# whereis -s svn
svn:
[root@localhost ~]#...
分类:
系统相关 时间:
2014-11-17 14:06:22
阅读次数:
247
which是查找命令的位置,是根据用户path路径进行查找,locate 是在数据库里查找,数据库大至每天更新一次。 whereis 可以找到可执行命令和man pagefind 就是根据条件查找文件。which 可以找到可执行文件和别名(alias)which 查看可执行文件的位置 whereis...
分类:
系统相关 时间:
2014-11-15 16:56:24
阅读次数:
213