设为首页
收藏本站
用户名
Email
自动登录
找回密码
密码
登录
注册
快捷导航
平台
Portal
论坛
BBS
文库
项目
群组
Group
我的博客
Space
搜索
搜索
热搜:
shell
linux
mysql
本版
用户
LinuxSir.cn,穿越时空的Linuxsir!
»
论坛
›
Linux 综合讨论区 —— LinuxSir.cn
›
shell进阶应用、shell编程
›
请问 find 如何排除某几个目录[已解决]
返回列表
查看:
2375
|
回复:
5
请问 find 如何排除某几个目录[已解决]
[复制链接]
jhuangjiahua
jhuangjiahua
当前离线
积分
9502
IP卡
狗仔卡
发表于 2005-8-29 20:21:09
|
显示全部楼层
|
阅读模式
find .xchat2/ ! ./xchat2/xchatlogs
find .xchat2/ ! -path ./xchat2/xchatlogs
find .xchat2/ -npath ./xchat2/xchatlogs
都没有用呀
用管道 | grep -v 是可以
但是我想只用 find 完成
回复
使用道具
举报
提升卡
置顶卡
沉默卡
喧嚣卡
变色卡
显身卡
patirot
patirot
当前离线
积分
56
IP卡
狗仔卡
发表于 2005-8-29 21:04:55
|
显示全部楼层
man find
回复
支持
反对
使用道具
举报
显身卡
BlazingBits
BlazingBits
当前离线
积分
259
IP卡
狗仔卡
发表于 2005-8-29 21:14:36
|
显示全部楼层
呵呵。man find很难看懂的。
看个例子吧。
$ find . -name Documents -prune -o -name '*.jpg' -print
打印出当前目录及其子目录下面的*.jpg文件,但是不要在Documents里面找.
回复
支持
反对
使用道具
举报
显身卡
yongjian
yongjian
当前离线
积分
2576
IP卡
狗仔卡
发表于 2005-8-30 01:07:17
|
显示全部楼层
http://www.linuxsir.cn/bbs/showthread.php?t=201202
A similar thread ...
回复
支持
反对
使用道具
举报
显身卡
yongjian
yongjian
当前离线
积分
2576
IP卡
狗仔卡
发表于 2005-8-30 01:22:05
|
显示全部楼层
A way to ignore several dirs at one time:
find dir \( -path subdir1 -o -path subdir2 \) -prune -o -name pattern -print
复制代码
回复
支持
反对
使用道具
举报
显身卡
jhuangjiahua
jhuangjiahua
当前离线
积分
9502
IP卡
狗仔卡
楼主
|
发表于 2005-8-30 10:51:54
|
显示全部楼层
谢谢,
回复
支持
反对
使用道具
举报
显身卡
返回列表
高级模式
B
Color
Image
Link
Quote
Code
Smilies
您需要登录后才可以回帖
登录
|
注册
本版积分规则
发表回复
回帖后跳转到最后一页
浏览过的版块
Linux 程序设计专题讨论
Linux 基础讨论区(新手速成)
Linux 输入开发与研究
LFS(LinuxfromScratch)
开源软件专题讨论
Redhat/Fedora/CentOS Linux
BSD 讨论专题
Archlinux讨论区
SuSE Linux
Copyright © 2002-2023
LinuxSir.cn
(http://www.linuxsir.cn/) 版权所有 All Rights Reserved.
Powered by
RedflagLinux!
技术支持:
中科红旗
|
京ICP备19024520号
快速回复
返回顶部
返回列表