Linux cpio命令

  [root@edu.jb51.net var]# ll //显示当前目录下的文件

  总用量 164

  drwxr-xr-x 2 root root 4096 2008-03-30 account

  drwxr-xr-x 9 root root 4096 2008-03-30 cache

  drwxr-xr-x 3 netdump netdump 4096 2008-03-30 crash

  drwxr-xr-x 3 root root 4096 2008-03-30 db

  drwxr-xr-x 3 root root 4096 2008-03-30 empty

  drwxr-xr-x 3 root root 4096 2008-03-30 ftp

  drwxrwx--T 2 root gdm 4096 4月 9 20:17 gdm

  drwxr-xr-x 25 root root 4096 2008-03-30 lib

  drwxr-xr-x 2 root root 4096 2004-08-13 local

  drwxrwxr-x 6 root lock 4096 5月 8 15:25 lock

  drwxr-xr-x 14 root root 4096 5月 8 15:14 log

  lrwxrwxrwx 1 root root 10 2008-03-30 mail -> spool/mail

  drwxr-xr-x 2 root root 4096 2004-08-13 nis

  drwxr-xr-x 2 root root 4096 2004-08-13 opt

  drwxr-xr-x 2 root root 4096 2004-08-13 preserve

  drwxr-xr-x 16 root root 4096 5月 8 15:14 run

  drwxr-xr-x 16 root root 4096 2008-03-30 spool

  drwxrwxrwt 3 root root 4096 1月 13 18:53 tmp

  drwx------ 2 root root 4096 2004-07-08 tux

  drwxr-xr-x 8 root root 4096 1月 19 19:39 www

  drwxr-xr-x 3 root root 4096 2008-03-30 yp

  [root@edu.jb51.net var]# ls | cpio -o >123.cpio //制作备份文件

  25 blocks

  [root@edu.jb51.net var]# ll //显示当前目录下的文件

  总用量 172

  -rw-r--r-- 1 root root 1024 5月 24 13:06 123.cpio

  drwxr-xr-x 2 root root 4096 2008-03-30 account

  drwxr-xr-x 9 root root 4096 2008-03-30 cache

  drwxr-xr-x 3 netdump netdump 4096 2008-03-30 crash

  drwxr-xr-x 3 root root 4096 2008-03-30 db

  drwxr-xr-x 3 root root 4096 2008-03-30 empty

  drwxr-xr-x 3 root root 4096 2008-03-30 ftp

  drwxrwx--T 2 root gdm 4096 4月 9 20:17 gdm

  drwxr-xr-x 25 root root 4096 2008-03-30 lib

  drwxr-xr-x 2 root root 4096 2004-08-13 local

  drwxrwxr-x 6 root lock 4096 5月 8 15:25 lock

  drwxr-xr-x 14 root root 4096 5月 8 15:14 log

  lrwxrwxrwx 1 root root 10 2008-03-30 mail -> spool/mail

  drwxr-xr-x 2 root root 4096 2004-08-13 nis

  drwxr-xr-x 2 root root 4096 2004-08-13 opt

  drwxr-xr-x 2 root root 4096 2004-08-13 preserve

  drwxr-xr-x 16 root root 4096 5月 8 15:14 run

  drwxr-xr-x 16 root root 4096 2008-03-30 spool

  drwxrwxrwt 3 root root 4096 1月 13 18:53 tmp

  drwx------ 2 root root 4096 2004-07-08 tux

  drwxr-xr-x 8 root root 4096 1月 19 19:39 www

  drwxr-xr-x 3 root root 4096 2008-03-30 yp

  [root@edu.jb51.net var]#