Visit Our UNIX and Linux User Community


Performance related to ls


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Performance related to ls
# 1  
Old 03-27-2006
Performance related to ls

can you please let me know will there be any performance improvement

if i change my command in unix from

ls rtlog* | grep "rtlog_[0]*4_"

to

ls rtlog_4_* rtlog_0004_*

assuming that i have patterns only as 4 or 0004 and not other pattern type.
# 2  
Old 03-29-2006
Possibly. A grep is an additional process that can be quite processor intensive.
# 3  
Old 03-29-2006
depends on no of files

IF the no of files to be listed are more (i.e) rtlog* leads to large no of files and if there are multiple threads running doingthe same thing, it would be better to list the exact file patterns rather than listing all files and selecting from it.
I saves you a process and also time.
 

Previous Thread | Next Thread
Test Your Knowledge in Computers #799
Difficulty: Medium
In digital numeral systems, the radix is the number of unique digits minus 1.
True or False?

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Question related to 'ps'

If I run a script called 'abc.sh' and then execute the following : ps -ef | grep 'abc.sh' I always get two rows of output, one for the executing script, and the other for the grep command that I have triggered after the pipe. Questions: Why does the second row turn up in the results. My... (10 Replies)
Discussion started by: jawsnnn
10 Replies

2. Shell Programming and Scripting

need downloading related help...but its not related to unix

Hi All, I am trying to dowmload the zip file "zkManageCustomers.zip " but i dont have access. Can anyone help me to download this file See the below link- http://www.ibm.com/developerworks/opensource/library/wa-aj-open/index.html?ca=drs- Please help me as early as... (1 Reply)
Discussion started by: aish11
1 Replies

3. UNIX for Advanced & Expert Users

Virtualization Related Help!!

Hi, My script needs to find out if it is running on a virtual machine. If it is then it needs to find out. 1 . The number of virtual processors. 2 . Actual physical box onto which the virtual machine is hosted. 3 .Processors on the physical machine. Actually there are some commands like... (1 Reply)
Discussion started by: prasi_in
1 Replies

4. AIX

vio related

In a dual vio, how will u know one lpar is in which vio? (1 Reply)
Discussion started by: shobhan.murthy
1 Replies

5. Fedora

How is OS X related to unix

Ok, I gotta ask this question, I have just begun fundamentals of UNIX in college and have learned or heard that Mac's OS-X is a linux based os! Does this mean that unix shell commands work in OS-X? I have no experience with os-x yet. I know it's a stupid question but I gotta know! (10 Replies)
Discussion started by: boarder428
10 Replies

6. News, Links, Events and Announcements

Announcing collectl - new performance linux performance monitor

About 4 years ago I wrote this tool inspired by Rob Urban's collect tool for DEC's Tru64 Unix. What makes this tool as different as collect was in its day is its ability to run at a low overhead and collect tons of stuff. I've expanded the general concept and even include data not available in... (0 Replies)
Discussion started by: MarkSeger
0 Replies

7. UNIX for Dummies Questions & Answers

How are the following two commands related?

Trying to get through UNIX class that I mostly missed due to illness. If anyone can help me with this question I'd appreciate it. Thank you. How are the following two commands related? 1s -1R /proc ps ax (1 Reply)
Discussion started by: radhanuja
1 Replies

8. UNIX for Dummies Questions & Answers

Unix Related

well through my 6 months education i know some unix os but i can't find one for my p3 via board can any one tell me where to find such please replay as email or private msg and thanks (3 Replies)
Discussion started by: JaMaL
3 Replies

9. UNIX for Advanced & Expert Users

x windows related

Hello, I am learning X/Motif programming.I wanted some information about how to create animations using this. can you please suggest me some website which contains this information?? I did not know where to post this thread.So I just posted it here. Thanks in advance. shilpa (1 Reply)
Discussion started by: informshilpa
1 Replies

Featured Tech Videos