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.
|