/var/log/bin目录
-rw-rw---- 1 mysql mysql 1073742484 Jan 12 10:56 mysql-bin.000026
-rw-rw---- 1 mysql mysql 1073742686 Jan 12 14:27 mysql-bin.000027
-rw-rw---- 1 mysql mysql 572163236 Jan 13 06:02 mysql-bin.000028
-rw-rw---- 1 mysql mysql 896 Jan 12 14:27 mysql-bin.index
文件如上.
ls -t mysql-bin.0* | tail +2
tail: cannot open `+2' for reading: No such file or directory---失败
...
liyihongcug 发表于 2011-01-13 13:24
+2的意思是从第二行一直显示到最后一行! 适用于所有情况! 难道你的tail不支持 +n???作者: liyihongcug 时间: 2011-01-13 13:34
tail +2
tail: cannot open `+2' for reading: No such file or directory
st_atime
Time when file data was last accessed. Changed by the
following functions: creat(), mknod(), pipe(),
utime(2), and read(2).
st_mtime
Time when data was last modified. Changed by the fol-
lowing functions: creat(), mknod(), pipe(), utime(),
and write(2).
st_ctime
Time when file status was last changed. Changed by the
following functions: chmod(), chown(), creat(),
link(2), mknod(), pipe(), unlink(2), utime(), and
write().
# ls -l
drwxrwxrwx 2 sam adm 4096 10月 30 20:14 file6
-rwxrwxrwx 2 sam adm 0 10月 31 01:01 http3.conf
-rwxrwxrwx 2 sam adm 0 10月 31 01:01 httpd.conf
# find . -perm -7 -print | xargs chmod o-w
# ls -l
drwxrwxr-x 2 sam adm 4096 10月 30 20:14 file6
-rwxrwxr-x 2 sam adm 0 10月 31 01:01 http3.conf
-rwxrwxr-x 2 sam adm 0 10月 31 01:01 httpd.conf
用grep命令在所有的普通文件中搜索hostname这个词:
# find . -type f -print | xargs grep "hostname"
./httpd1.conf:# different IP addresses or hostnames and have them handled by the
./httpd1.conf:# VirtualHost: If you want to maintain multiple domains/hostnames
on your
用grep命令在当前目录下的所有普通文件中搜索hostnames这个词:
# find . -name \* -type f -print | xargs grep "hostnames"
./httpd1.conf:# different IP addresses or hostnames and have them handled by the
./httpd1.conf:# VirtualHost: If you want to maintain multiple domains/hostnames
on your
-I replace-str
Replace occurrences of replace-str in the initial-arguments with names read from standard input. Also,
unquoted blanks do not terminate input items; instead the separator is the newline character. Implies
-x and -L 1.