Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1199777
  • 博文数量: 49
  • 博客积分: 10237
  • 博客等级: 上将
  • 技术积分: 2764
  • 用 户 组: 普通用户
  • 注册时间: 2007-08-02 16:19
个人简介

满随天外云卷云舒 静观庭前花开花落

文章分类

全部博文(49)

文章存档

2013年(18)

2012年(9)

2011年(1)

2010年(5)

2009年(3)

2008年(13)

分类: LINUX

2013-06-12 20:45:45

#keep the folder structure copy some kind fiels to the destination folder
cd /top/levle/to/copy
find . -name '*.txt' | cpio -pdm /path/to/destdir


# copy some kind fiels to the destination folder without keep the structure


find /path/to/directory -name "*.mp3" -exec cp {} /some/other/dir/ \;
find . -name "*.UD1" -exec cp {} ../IBRH10UD208/ \;


Alternative:
find /path/to/dir/ -name '*.mp3' | xargs cp -t /target/


recurisive tar the tar package to current folder.
find . -name "*.tar.gz" -exec tar zxvf  {} ./ \;


recurisive rm the csh file of the IBRH10UD208
find ./IBRH10UD208/ -name "*.csh" -exec sudo rm {}  \;


recurisive cp the csh file of current folder
find . -name "*.csh" -exec sudo cp {} ./IBRH10UD208 \;

阅读(1364) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~