易截截图软件、单文件、免安装、纯绿色、仅160KB

Linux下文件查找实例

花了一个周末的时间列出来的。共享出来,希望大家花几分钟看看。这也算是LINUX下比较实用的查找方式了
which(寻找“执行文件”)
[root@localhost home]# which [-a] command
-a : 将所有可找到的命令均列出,而不仅仅列出第一个找到的命令名称
范例:
[root@localhost home]# which passwd
/usr/bin/passwd
whereis(寻找特定文件)
[root@localhost home]# whereis [-bmsu] 文件或目录名
[root@localhost home]# whereis passwd
passwd: /etc/passwd /usr/bin/passwd /usr/share/man/man5/passwd.5.gz ……
locate(寻找文件)
[root@localhost home]# locate filename
[root@localhost home]# locate passwd
/lib/security/pam_passedqc.so
/lib/security/pam_unix_passwd.so
…… 
 以上这些寻找文件的方法有以下特点:
1. 速度奇快
2. 查找不完整
      #所谓速度奇快是指,这些命令是直接搜索文件系统数据库的。而查找不完整指的是,你可能在数据库
      #没更新之前查询文件所以查找不到最新的文件。也可能找出一些已经删除的文件。
find (功能强大而直接搜索硬盘)
实例一: 将过去系统上24小时内更过的内容(mtime)的文件列出
[root@localhost home]# find / -mtime 0
# 0 : 表示当从现在开始到24小时前修改的都列出来。
# 如果是3天前的24小时内的就使用find / -mtime 3,
# 意思是说今天之前的3*24-4*24小时之间修改过的列出来。
实例二: 查找/etc下面的文件,如果文件日期比 /etc/passwd新的就列出来。
[root@localhost home]# find /etc -newer /etc/passwd
# -newer 用在识别两个文件之间的新旧关系。
实例三: 搜索/home下面属于peter的文件
[root@localhost home]# find /home -user peter
# 找出任何一个用户在系统中的所有文件。
实例四: 搜索系统中不属于任何人的文件
[root@localhost home]# find / -nouser
#可以找出一些乱七八糟的文件。
实例五: 搜索文件名为passwd的文件。
[root@localhost home]# find / -name passwd
#使用 -name 可以搜索文件名。
实例六: 搜索文件属性为 f(普通文件)的文件。
[root@localhost home]# find / -type f
#用于一些特殊的查找文件。
实例七:搜索文件中含有SGID/SUID/SBIT的属性。
[root@localhost home]# find / -perm +7000
#7000就是 ---s--s--t,只


相关文档:

linux 0.11 内核学习 fcntl.c


/*
 *  linux/fs/fcntl.c
 *
 *  (C) 1991  Linus Torvalds
 */
#include <string.h>
#include <errno.h>
#include <linux/sched.h>
#include <linux/kernel.h>
#include <asm/segment.h>
#include <fcntl.h>
#include <sys/stat. ......

Linux文件查找命令find (两篇文章)

Linux文件查找命令find,xargs详述
一、find 命令格式
1、find命令的一般形式为;
 find pathname -options [-print -exec -ok ...]
2、find命令的参数;
pathname: find命令所查找的目录路径。例如用.来表示当前目录,用/来表示系统根目录。
-print: find命令将匹配的文件输出到标准输出。
-exec: find命令对 ......

unbuntu linux bugzilla配置过程

在vm下安装unbuntu linux server 9.04
安装完成 查看IP地址 ifconfig
安装telnet sudo apt-get install xinetd telnetd
因为不需要太多人TELNET  暂时不做修改配置文件。
安装FTP sudo apt-get install vsftpd
同样不需要配置 使用默认的ftp:ftp用户访问
mysql
  sudo apt-get install mysql-server
apac ......

linux下自带的mysql卸载和安装

linux下 mysql 的卸载和安装
关键字: linux下 mysql 的卸载和安装

一、前期准备:
    1
.由于redhat Enterprise 5 中自带一个mysql的版本,如果在安装linux前未选择mysql的安装此步就可跳过,因为我当时安装了现在将其卸载
,步骤如下:
     &nb ......

linux下磁盘操作命令

查看系统的磁盘信息:
fdisk -l
[root@localhost home]# fdisk -l
Disk /dev/hda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 979 7759395 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号