avatar
a question about "find"?# Unix - 噫吁兮,危乎高哉
j*y
1
when i use
find . -name "*.[ch]" -print > filelist
i also get a lot of file names in SCCS directory, which i dont' want.
how can i remove these filenames?
thanks,
avatar
a*x
2

^ | grep -v SCCS

【在 j***y 的大作中提到】
: when i use
: find . -name "*.[ch]" -print > filelist
: i also get a lot of file names in SCCS directory, which i dont' want.
: how can i remove these filenames?
: thanks,

avatar
f*d
3
when I use * for find, I consider it as a escaped character normally for sunOS
so I put:
find . -name \*.ch > filelist
not sure this helps your case or not.

【在 j***y 的大作中提到】
: when i use
: find . -name "*.[ch]" -print > filelist
: i also get a lot of file names in SCCS directory, which i dont' want.
: how can i remove these filenames?
: thanks,

avatar
j*y
4
this doesn't work.
thanks anyway,

sunOS

【在 f***d 的大作中提到】
: when I use * for find, I consider it as a escaped character normally for sunOS
: so I put:
: find . -name \*.ch > filelist
: not sure this helps your case or not.

avatar
j*y
5
great, it works!
thank you very much,

【在 a*******x 的大作中提到】
:
: ^ | grep -v SCCS

avatar
c*n
6
you can just use
find your_dir ! -name "*SCCS*" -name "*.[ch]" -blahblah
find is powerful
and grep -R
haha, as long as your disk is fast enough

【在 j***y 的大作中提到】
: great, it works!
: thank you very much,

avatar
j*y
7
when i use
find . ! -name "*SCCS*" -name "*.[ch]" -print > filelist
i got the same result as
find . -name "*.[ch]" -print > filelist
the SCCS filenames can't be eliminated yah.

【在 c******n 的大作中提到】
: you can just use
: find your_dir ! -name "*SCCS*" -name "*.[ch]" -blahblah
: find is powerful
: and grep -R
: haha, as long as your disk is fast enough

avatar
c*n
8
what system are you using?
this works with me

【在 j***y 的大作中提到】
: when i use
: find . ! -name "*SCCS*" -name "*.[ch]" -print > filelist
: i got the same result as
: find . -name "*.[ch]" -print > filelist
: the SCCS filenames can't be eliminated yah.

avatar
j*y
9
mine is Solaris 2.5.1

【在 c******n 的大作中提到】
: what system are you using?
: this works with me

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。