免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 6133 | 回复: 2
打印 上一主题 下一主题

Solaris下的find命令使用。 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2012-02-28 21:30 |只看该作者 |倒序浏览
svdw1151*\O01FLX3-69: ls -lt|sort -r -n +4 -5|more
-rw-r-----   1 oracle   dba      7145984 Feb 28 08:13 tns_dflx02.log
-rwxr-xr-x   1 oracle   dba      2355589 Feb 28 07:07 O01FLX3_extract.out
-rw-rw-r--   1 root     other    2098573 Feb 28 05:00 O01FLX3_dba_adsm_rman_clean.out
-rw-rw-r--   1 oracle   dba      1629026 Feb 25 21:14 rman_backup.log.20120225_090243
-rw-rw-r--   1 oracle   dba      1622742 Feb 22 22:40 rman_backup.log.20120222_090317
-rw-rw-r--   1 oracle   dba      1573379 Feb 18 21:48 rman_backup.log.20120218_090320
-rw-rw-r--   1 oracle   dba      1567187 Feb 15 22:50 rman_backup.log.20120215_090321
-rw-rw-r--   1 oracle   dba      1558551 Feb 11 21:24 rman_backup.log.20120211_090243
-rw-rw-r--   1 oracle   dba      1552316 Feb  8 21:41 rman_backup.log.20120208_090312
-rw-rw-r--   1 oracle   dba      1544994 Feb  4 22:13 rman_backup.log.20120204_090239
-rw-rw-r--   1 oracle   dba      1538179 Feb  1 22:35 rman_backup.log.20120201_090312
-rw-rw-r--   1 oracle   dba      1526722 Feb 26 14:47 rman_backup.log.20120226_142808
-rw-rw-r--   1 oracle   dba      1525912 Feb 27 09:27 rman_backup.log.20120227_090643
-rw-rw-r--   1 oracle   dba      1519478 Feb 24 09:26 rman_backup.log.20120224_090640
-rw-rw-r--   1 oracle   dba      1519405 Feb 20 11:29 rman_backup.log.20120220_090628
-rw-rw-r--   1 oracle   dba      1517158 Feb 23 12:53 rman_backup.log.20120223_122944
-rw-rw-r--   1 oracle   dba      1513141 Feb 21 09:30 rman_backup.log.20120221_090617
-rw-rw-r--   1 oracle   dba      1477378 Feb 19 16:30 rman_backup.log.20120219_154758
-rw-rw-r--   1 oracle   dba      1462102 Feb 16 18:16 rman_backup.log.20120216_175749
-rw-rw-r--   1 oracle   dba      1461502 Feb 17 09:25 rman_backup.log.20120217_090635
-rw-rw-r--   1 oracle   dba      1455033 Feb 14 09:25 rman_backup.log.20120214_090624
-rw-rw-r--   1 oracle   dba      1453706 Feb 12 15:32 rman_backup.log.20120212_151306
-rw-rw-r--   1 oracle   dba      1452866 Feb 13 09:24 rman_backup.log.20120213_090637
-rw-rw-r--   1 oracle   dba      1447094 Feb  9 13:10 rman_backup.log.20120209_124958
-rw-rw-r--   1 oracle   dba      1446472 Feb 10 09:25 rman_backup.log.20120210_090613
-rw-rw-r--   1 oracle   dba      1441699 Feb  5 16:43 rman_backup.log.20120205_162610
-rw-rw-r--   1 oracle   dba      1440169 Feb  7 09:26 rman_backup.log.20120207_090607
-rw-rw-r--   1 oracle   dba      1438002 Feb  6 09:26 rman_backup.log.20120206_090615
-rw-rw-r--   1 oracle   dba      1432728 Feb  2 09:28 rman_backup.log.20120202_090311
-rw-rw-r--   1 oracle   dba      1431371 Feb  3 09:29 rman_backup.log.20120203_090614


有比较多的rman开头的log,我想用find命令把它移动到其它目录。

svdw1151*\O01FLX3-73: find . -name "rman*" -exec mv {} /dflx02/flx/o01flx3dump/olog/. \;
find: bad option rman_backup.log.20120202_090311
find: path-list predicate-list

可是使用的时候报错,请问如何写这个命令

论坛徽章:
33
ChinaUnix元老
日期:2015-02-02 08:55:39CU十四周年纪念徽章
日期:2019-08-20 08:30:3720周年集字徽章-周	
日期:2020-10-28 14:13:3020周年集字徽章-20	
日期:2020-10-28 14:04:3019周年集字徽章-CU
日期:2019-09-08 23:26:2519周年集字徽章-19
日期:2019-08-27 13:31:262016科比退役纪念章
日期:2022-04-24 14:33:24
2 [报告]
发表于 2012-02-28 21:37 |只看该作者
  1. find . -name "rman*" -exec echo mv {} /dflx02/flx/o01flx3dump/olog/ \; | sh
复制代码

论坛徽章:
15
2015年辞旧岁徽章
日期:2015-03-03 16:54:15双鱼座
日期:2015-01-15 17:29:44午马
日期:2015-01-06 17:06:51子鼠
日期:2014-11-24 10:11:13寅虎
日期:2014-08-18 07:10:55酉鸡
日期:2014-04-02 12:24:51双子座
日期:2014-04-02 12:19:44天秤座
日期:2014-03-17 11:43:36亥猪
日期:2014-03-13 08:13:51未羊
日期:2014-03-11 12:42:03白羊座
日期:2013-11-20 10:15:18CU大牛徽章
日期:2013-04-17 11:48:45
3 [报告]
发表于 2012-02-29 08:02 |只看该作者
  1. find . -type f -name "rman*" -exec mv {} /dflx02/flx/o01flx3dump/olog/ \;
复制代码
或者
  1. find . -type f -name "rman*" |xargs -i mv {} /dflx02/flx/o01flx3dump/olog/
复制代码
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP