由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Unix版 - ls in Unix (Sun)
相关主题
How to find a file in the deep children directory?如何把一个目录下的文件名全部改成小写?
UNIX Tip: the bad and the good[转载] How to list the files with specific permission?
questionshell programming problems
[转载] grep question How do i get a list of all computers?
请问如何结束一个qlogin sessionreplace a string in all files under a directory?
面试中的unix, linux的几个问题,不知道自己答对了没有。Re: 如何用grep查找子目录下的文件?--stop!
anyone used C in plotting in Linux or Unix?Re: 如何用grep查找子目录下的文件?
unix c plotting?sed? awk? or mak a program?
相关话题的讨论汇总
话题: ls话题: unix话题: sun话题: plot话题: find
进入Unix版参与讨论
1 (共1页)
s*****l
发帖数: 2041
1
就是当某个目录下的文件特别多的时候(上千个),ls就不管用了?
是不是应该加什么特别的option,我用man ls看了看还是不得要领。
那位专家解惑?谢谢了。
s**s
发帖数: 242
2
在这种情况下用*或?等匹配符会有问题,
这时可用ls+grep代替,具体要看你想列什么样的文件

【在 s*****l 的大作中提到】
: 就是当某个目录下的文件特别多的时候(上千个),ls就不管用了?
: 是不是应该加什么特别的option,我用man ls看了看还是不得要领。
: 那位专家解惑?谢谢了。

s*****l
发帖数: 2041
3
正是你说的这种情况,光用ls,可以看,都是一用ls plot*的时候
就玩完了。
多谢指教

【在 s**s 的大作中提到】
: 在这种情况下用*或?等匹配符会有问题,
: 这时可用ls+grep代替,具体要看你想列什么样的文件

s**s
发帖数: 242
4
then try:
ls | grep ^plot

【在 s*****l 的大作中提到】
: 正是你说的这种情况,光用ls,可以看,都是一用ls plot*的时候
: 就玩完了。
: 多谢指教

k******e
发帖数: 10
5
use command find
find . -exec ls | more
kinda of that. but the above line is not correct. I don't have unix os at hand.

【在 s*****l 的大作中提到】
: 正是你说的这种情况,光用ls,可以看,都是一用ls plot*的时候
: 就玩完了。
: 多谢指教

s**s
发帖数: 242
6
用find 也可:
find . -name plot\* -exec ls -l {} \;

【在 k******e 的大作中提到】
: use command find
: find . -exec ls | more
: kinda of that. but the above line is not correct. I don't have unix os at hand.

f*****r
发帖数: 229
7
If you don't need long format, try a simple command:
echo plot*

【在 k******e 的大作中提到】
: use command find
: find . -exec ls | more
: kinda of that. but the above line is not correct. I don't have unix os at hand.

1 (共1页)
进入Unix版参与讨论
相关主题
sed? awk? or mak a program?请问如何结束一个qlogin session
how to grep a string in all sub-dirs?面试中的unix, linux的几个问题,不知道自己答对了没有。
how to escape both ' and " from tcsh?anyone used C in plotting in Linux or Unix?
where is the pre-build version of cxterm-solarisunix c plotting?
How to find a file in the deep children directory?如何把一个目录下的文件名全部改成小写?
UNIX Tip: the bad and the good[转载] How to list the files with specific permission?
questionshell programming problems
[转载] grep question How do i get a list of all computers?
相关话题的讨论汇总
话题: ls话题: unix话题: sun话题: plot话题: find